/* Общие стили сетки товаров (каталог, страница бренда, избранное) */

.size-scroll-wrapper {
  display: flex;
  overflow-x: auto;
  gap: 0.4rem;
  padding-bottom: 0.4rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.size-scroll-wrapper::-webkit-scrollbar { display: none; }

.size-option {
  border: 1px solid #000 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #000 !important;
  padding: 0.2rem 0.35rem !important;
  font-size: 0.75rem !important;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  text-align: center;
}

#product-list {
  padding-left: 18px;
  padding-right: 18px;
}

.catalog-layout {
  display: block;
}

.catalog-main {
  min-width: 0;
}

.catalog-swiper img,
.mini-swiper img {
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* Desktop: листание фото по позиции курсора (до 4 кадров) */
@media (min-width: 768px) {
  .product-image-area .catalog-swiper:has(.swiper-slide:nth-child(2)) .swiper-wrapper,
  .product-image-area .mini-swiper:has(.swiper-slide:nth-child(2)) .swiper-wrapper {
    position: relative;
    display: block;
    height: 100%;
    transform: none !important;
    transition: none !important;
  }

  .product-image-area .catalog-swiper:has(.swiper-slide:nth-child(2)) .swiper-slide,
  .product-image-area .mini-swiper:has(.swiper-slide:nth-child(2)) .swiper-slide {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100%;
    opacity: 0;
    transition: opacity 0.18s ease;
    z-index: 1;
    pointer-events: none;
  }

  .product-image-area .catalog-swiper:has(.swiper-slide:nth-child(2)) .swiper-slide.is-card-active,
  .product-image-area .mini-swiper:has(.swiper-slide:nth-child(2)) .swiper-slide.is-card-active,
  .product-image-area:not(.has-card-gallery) .catalog-swiper:has(.swiper-slide:nth-child(2)) .swiper-slide:first-child,
  .product-image-area:not(.has-card-gallery) .mini-swiper:has(.swiper-slide:nth-child(2)) .swiper-slide:first-child {
    opacity: 1;
    z-index: 2;
  }
}

.ff-card {
  border: none !important;
  box-shadow: none !important;
  background: transparent;
}

.product-image-area .favorite-toggle {
  top: 6px;
  right: 6px;
  margin: 0;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  padding: 0;
  pointer-events: auto;
}

.product-image-area .favorite-toggle i {
  font-size: 1.1rem;
  line-height: 1;
  color: #666 !important;
  transition: color 0.2s;
}

.product-image-area .favorite-toggle:hover i,
.product-image-area .favorite-toggle.active i,
.product-image-area .favorite-toggle i.bi-heart-fill {
  color: #000 !important;
}

.product-image-area .ff-size-toggle {
  top: 6px;
  right: 36px;
  margin: 0;
  color: #666;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  pointer-events: auto;
}

.product-image-area .ff-size-toggle:hover {
  color: #000;
}

.product-image-area + .card-body {
  padding-top: 0.25rem !important;
}

.ff-card .ff-card-content {
  position: relative;
}

.ff-card .ff-card-content * {
  box-sizing: border-box;
}

.ff-card .ff-card-content .ff-info,
.ff-card .ff-card-content .ff-sizes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  transition: transform 220ms ease, opacity 220ms ease;
}

.ff-card .ff-card-content .ff-info {
  transform: translateX(0);
  opacity: 1;
}

.ff-card .ff-card-content .ff-sizes {
  transform: translateX(100%);
  opacity: 0;
}

.ff-card.show-sizes .ff-card-content .ff-info {
  transform: translateX(-100%);
  opacity: 0;
}

.ff-card.show-sizes .ff-card-content .ff-sizes {
  transform: translateX(0);
  opacity: 1;
}

/* Компактные доступные размеры под ценой — тот же INT-формат, что в приложении. */
.product-image-area .ff-size-toggle {
  display: none !important;
}

.ff-card .ff-card-content .ff-sizes {
  display: none !important;
}

.ff-card .ff-card-content .ff-info {
  transform: none !important;
  opacity: 1 !important;
}

.ff-card-size-list {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 1rem;
  margin-top: 0.35rem;
  overflow: hidden;
  color: #6e685f;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1rem;
  white-space: nowrap;
}

.ff-card-size-separator {
  color: #aaa49b;
}

.ff-info .card-title {
  margin-bottom: 0.85rem !important;
}

.card-price {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 2px 8px;
  width: 100%;
  text-align: left;
}

.card-price .ff-linebreak {
  flex-basis: 100%;
  width: 0;
  height: 0;
}

.ff-discount-badge-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dc3545;
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 5px;
  margin-top: 0;
}

.ff-new-badge-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #212529;
  color: #fff;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 5px;
  margin-top: 0;
}

.catalog-pagination-block {
  min-height: 56px;
  width: 100%;
}

.catalog-pagination-inner {
  gap: 0.75rem;
}

/* Чипы фильтров / сортировки (как в каталоге) */
.ff-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 19px;
  border-radius: 7px;
  border: 1.3px solid #d2d2d2;
  background: #fff;
  color: #222;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  box-shadow: none;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.ff-chip:hover,
.ff-chip:focus-visible {
  background: #f6f6f6;
  border-color: #bbb;
  outline: none;
  color: #222;
}

.ff-chip.is-active {
  border-color: #111;
  color: #111;
  font-weight: 700;
  background: #fff;
}

/* Sticky-блок: категории + тулбар */
.catalog-sticky-filters {
  position: sticky;
  top: var(--site-navbar-height, 56px);
  z-index: 1015;
  background: #fff;
  padding-bottom: 2px;
  transition: transform 0.28s ease, margin-bottom 0.28s ease, box-shadow 0.28s ease;
  will-change: transform;
}

.catalog-sticky-filters.is-stuck {
  top: calc(var(--site-navbar-height, 56px) - 1px);
  box-shadow: 0 -12px 0 12px #fff, 0 6px 16px rgba(0, 0, 0, 0.06);
}

.catalog-sticky-filters.is-hidden {
  transform: translateY(calc(-100% - var(--site-navbar-height, 56px)));
  margin-bottom: calc(-1 * var(--catalog-sticky-h, 0px));
  pointer-events: none;
  box-shadow: none;
}

.brand-page {
  margin-top: 1rem !important;
}

@media (max-width: 767.98px) {
  .catalog-page-heading {
    padding-left: 6px;
    padding-right: 6px;
    margin-bottom: 0.85rem;
  }

  .brand-page .brand-page-heading {
    margin-bottom: 0.35rem;
  }

  .brand-breadcrumb-nav {
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
    padding-left: 6px;
    padding-right: 6px;
  }

  .brand-page-title {
    padding-left: 6px;
    padding-right: 6px;
    margin-bottom: 0.55rem;
    text-align: center;
  }

  .catalog-sticky-filters,
  .brand-sticky-filters {
    position: sticky;
    top: var(--site-navbar-height, 56px);
    z-index: 1015;
    padding-top: 8px;
    margin-top: 0;
    background: #fff;
  }
}

@media (min-width: 768px) {
  .catalog-page,
  .brand-page {
    padding-left: 12px !important;
    padding-right: 12px !important;
    overflow-x: visible;
  }

  .brand-layout {
    display: block;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .brand-page-title {
    max-width: 1440px;
    margin: 0 auto 0.55rem;
    padding: 0 0 10px;
    border-bottom: 1px solid #ececec;
    font-size: clamp(1.1rem, 1.6vw, 1.35rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: #111;
  }

  .catalog-main,
  .brand-main {
    min-width: 0;
  }

  .catalog-main #product-list,
  .catalog-main .ff-applied,
  .catalog-main .catalog-toolbar,
  .catalog-main .catalog-page-heading,
  .brand-main #product-list,
  .brand-main .ff-applied,
  .brand-main .catalog-toolbar {
    padding-left: 0;
    padding-right: 0;
  }

  .brand-breadcrumb-nav {
    max-width: 1440px;
    margin: 0.35rem auto 0.55rem;
    padding: 0;
  }
}


@media (max-width: 991.98px) {
  .catalog-layout {
    display: block;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .catalog-page .catalog-page-heading {
    margin-bottom: 0.35rem;
    padding: 0 6px;
  }

  .catalog-page .catalog-page-heading h1 {
    margin: 0;
    font-size: clamp(1.25rem, 4.5vw, 1.75rem);
    line-height: 1.2;
    font-weight: 600;
  }

  .catalog-page .catalog-page-heading p {
    margin-top: 4px;
    text-align: left;
  }

  .catalog-page .catalog-main > .catalog-sticky-filters {
    position: sticky !important;
    top: var(--site-navbar-height, 56px);
    z-index: 1015;
    width: 100%;
    padding-top: 8px;
    margin-top: 0;
    margin-bottom: 0;
    background: #fff;
    transform: none !important;
    box-shadow: none;
  }

  .catalog-page .catalog-main > .catalog-sticky-filters.is-stuck {
    top: calc(var(--site-navbar-height, 56px) - 1px);
    box-shadow: 0 -12px 0 12px #fff, 0 6px 16px rgba(0, 0, 0, 0.06);
  }

  .catalog-page .catalog-sticky-filters .brand-toolbar,
  .catalog-page .catalog-sticky-filters .catalog-toolbar {
    position: static;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    min-height: 0;
    padding: 0 6px;
  }

  .catalog-page .brand-categories-bar {
    padding-left: 6px;
    padding-right: 6px;
    margin: 0 0 0.55rem;
  }

  .catalog-page .brand-categories-bar .ff-edge {
    display: none !important;
  }

  .catalog-page .brand-categories-bar .ff-scroll {
    display: flex;
    flex-wrap: nowrap;
    grid-auto-flow: unset;
    grid-template-rows: unset;
    grid-auto-columns: unset;
    gap: 7px;
  }

  .catalog-page .brand-categories-bar .ff-chip {
    height: 32px;
    font-size: 14px;
    padding: 0 10px;
  }

  .catalog-page .catalog-filters-rail.ff-sheet {
    position: fixed !important;
    inset: 0;
    z-index: 1050;
    display: block;
    pointer-events: none;
    height: auto;
    max-height: none;
    align-self: auto;
  }

  .catalog-page .catalog-filters-rail.ff-sheet.is-open {
    pointer-events: auto;
  }

  .catalog-page .catalog-filters-rail .ff-sheet-panel {
    position: absolute !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: min(88vh, 760px);
    border-right: 0;
    transform: translateY(calc(100% + 80px));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
  }

  .catalog-page .catalog-filters-rail.is-open .ff-sheet-panel {
    transform: translateY(0);
  }

  .catalog-page .catalog-filters-rail .ff-sheet-backdrop {
    display: block !important;
  }

  .catalog-page .catalog-filters-rail .ff-sheet-drag-handle,
  .catalog-page .catalog-filters-rail .menu-drag-handle,
  .catalog-page .catalog-filters-rail .ff-sheet-close,
  .catalog-page .catalog-filters-rail .menu-close-button,
  .catalog-page .catalog-filters-rail .ff-sheet-header {
    display: block !important;
  }

  .catalog-page .catalog-filters-rail .ff-apply-btn {
    display: flex;
  }

  /* Brand: bottom sheet фильтров (категория, размер, цвет) */
  .brand-page .catalog-filters-rail.ff-sheet {
    position: fixed !important;
    inset: 0;
    z-index: 1050;
    display: block;
    pointer-events: none;
    height: auto;
    max-height: none;
    align-self: auto;
  }

  .brand-page .catalog-filters-rail.ff-sheet.is-open {
    pointer-events: auto;
  }

  .brand-page .catalog-filters-rail .ff-sheet-panel {
    position: absolute !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: min(88vh, 760px);
    border-right: 0;
    transform: translateY(calc(100% + 80px));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
  }

  .brand-page .catalog-filters-rail.is-open .ff-sheet-panel {
    transform: translateY(0);
  }

  .brand-page .catalog-filters-rail .ff-sheet-backdrop {
    display: block !important;
  }

  .brand-page .catalog-filters-rail .ff-sheet-drag-handle,
  .brand-page .catalog-filters-rail .menu-drag-handle,
  .brand-page .catalog-filters-rail .ff-sheet-close,
  .brand-page .catalog-filters-rail .menu-close-button,
  .brand-page .catalog-filters-rail .ff-sheet-header {
    display: block !important;
  }

  .brand-page .catalog-filters-rail .ff-apply-btn {
    display: flex;
  }

  .catalog-page .ff-sort-box .dropdown-menu,
  .brand-page .ff-sort-box .dropdown-menu {
    display: none !important;
  }

  .brand-page .brand-page-heading {
    margin-bottom: 0.35rem;
    padding: 0 6px;
  }

  .brand-page .brand-main > .brand-sticky-filters {
    position: sticky !important;
    top: var(--site-navbar-height, 56px);
    z-index: 1015;
    width: 100%;
    padding-top: 8px;
    margin-top: 0;
    margin-bottom: 0;
    background: #fff;
    transform: none !important;
    box-shadow: none;
  }

  .brand-page .brand-main > .brand-sticky-filters.is-stuck {
    top: calc(var(--site-navbar-height, 56px) - 1px);
    box-shadow: 0 -12px 0 12px #fff, 0 6px 16px rgba(0, 0, 0, 0.06);
  }

  .brand-page .brand-sticky-filters .brand-toolbar,
  .brand-page .brand-sticky-filters .catalog-toolbar {
    position: static;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    min-height: 0;
    padding: 0;
  }

  .brand-page .brand-categories-bar {
    padding-left: 0;
    padding-right: 0;
    margin: 0 0 0.55rem;
  }

  .brand-page .brand-categories-bar .ff-edge {
    display: none !important;
  }

  .brand-page .brand-categories-bar .ff-scroll {
    display: flex;
    flex-wrap: nowrap;
    grid-auto-flow: unset;
    grid-template-rows: unset;
    grid-auto-columns: unset;
    gap: 7px;
  }

  .brand-page .brand-categories-bar .ff-chip {
    height: 32px;
    font-size: 14px;
    padding: 0 10px;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .brand-page .brand-breadcrumb-nav {
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
    padding-left: 6px;
    padding-right: 6px;
  }

  .brand-page .brand-page-title {
    padding-left: 6px;
    padding-right: 6px;
  }
}

@media (min-width: 992px) {
  .catalog-layout {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    grid-template-areas: "rail main";
    align-items: start;
    gap: 0 24px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
  }

  .catalog-layout > .catalog-filters-rail {
    grid-area: rail;
  }

  .catalog-layout > .catalog-main {
    grid-area: main;
  }

  #catalogCategoriesBar,
  #ffAllFiltersBtn {
    display: none !important;
  }

  .catalog-page-heading {
    flex: 1 1 auto;
  }

  .catalog-page-heading h1 {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.2;
    font-weight: 600;
  }

  .catalog-page-heading p {
    margin-top: 4px;
    text-align: left;
  }

  .catalog-page .catalog-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "heading sort"
      "applied applied"
      "products products";
    align-items: start;
    column-gap: 20px;
  }

  .catalog-page .catalog-main > .catalog-page-heading {
    grid-area: heading;
    margin-bottom: 18px;
    padding: 0 0 10px;
    border-bottom: 1px solid #eee;
    min-width: 0;
  }

  .catalog-page .catalog-main > .catalog-sticky-filters {
    grid-area: sort;
    position: static !important;
    width: auto;
    margin: 0;
    padding: 0;
    transform: none !important;
    box-shadow: none !important;
    justify-self: end;
    align-self: start;
  }

  .catalog-page .catalog-main > .ff-applied {
    grid-area: applied;
  }

  .catalog-page .catalog-main > #product-list {
    grid-area: products;
  }

  .catalog-main .catalog-toolbar {
    position: relative;
    z-index: 102;
    justify-content: flex-end;
    margin-bottom: 0;
    min-height: 42px;
    padding: 0;
  }

  .catalog-main .ff-sort-box {
    position: relative;
    z-index: 103;
  }

  .catalog-main .ff-sort-box-btn {
    height: 38px;
    padding: 0 4px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .catalog-main .ff-sort-box-btn:hover,
  .catalog-main .ff-sort-box-btn:focus,
  .catalog-main .ff-sort-box-btn.show {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .catalog-main .ff-sort-box .dropdown-menu {
    z-index: 1100;
  }

  /* Sticky-сайдбар фильтров (каталог) */
  .catalog-page:not(.brand-page) .catalog-filters-rail.ff-sheet,
  .catalog-page:not(.brand-page) .brand-filters-rail.ff-sheet {
    position: sticky !important;
    top: var(--site-navbar-height, 56px);
    align-self: start;
    z-index: 10;
    display: block;
    pointer-events: auto !important;
    height: auto;
    max-height: none;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-sheet-backdrop {
    display: none !important;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-sheet-panel {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none;
    transform: none !important;
    box-shadow: none !important;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    overflow: visible;
    background: #fff;
    padding-left: 0;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-sheet-drag-handle,
  .catalog-page:not(.brand-page) .catalog-filters-rail .menu-drag-handle {
    display: none !important;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-sheet-close,
  .catalog-page:not(.brand-page) .catalog-filters-rail .menu-close-button {
    display: none !important;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-sheet-header {
    display: none;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-sheet-body {
    padding: 2px 8px 6px 0;
    overflow: visible;
    flex: 0 0 auto;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-acc-head {
    padding-left: 0;
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 0.88rem;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-acc {
    border-bottom: 1px solid #ededed;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-acc + .ff-acc {
    margin-top: 0;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-acc-body {
    max-height: 232px;
    padding: 2px 8px 10px 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #a8a8a8 #f3f3f3;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail [data-acc="size"] .ff-acc-body,
  .catalog-page:not(.brand-page) .catalog-filters-rail [data-acc="season"] .ff-acc-body,
  .catalog-page:not(.brand-page) .catalog-filters-rail [data-acc="sale"] .ff-acc-body,
  .catalog-page:not(.brand-page) .catalog-filters-rail [data-acc="price"] .ff-acc-body {
    max-height: 190px;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-acc-body::-webkit-scrollbar {
    width: 5px;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-acc-body::-webkit-scrollbar-track {
    background: #f3f3f3;
    border-radius: 999px;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-acc-body::-webkit-scrollbar-thumb {
    background: #a8a8a8;
    border-radius: 999px;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-acc-body::-webkit-scrollbar-thumb:hover {
    background: #777;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-option {
    min-height: 34px;
    padding: 6px 4px 6px 0;
    border-radius: 0;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail [data-acc="category"] .ff-option input,
  .catalog-page:not(.brand-page) .catalog-filters-rail [data-acc="category"] .ff-option-label::before,
  .catalog-page:not(.brand-page) .catalog-filters-rail [data-acc="category"] .ff-option-label::after {
    display: none !important;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail [data-acc="category"] .ff-option-label {
    padding-left: 10px;
    font-size: 0.93rem;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail [data-acc="category"] .ff-option.is-selected {
    background: #f5f5f5;
    box-shadow: inset 2px 0 0 #111;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail [data-acc="category"] .ff-option.is-selected .ff-option-label {
    font-weight: 700;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-sheet-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 0 0 auto;
    gap: 8px;
    padding: 10px 8px 10px 0;
    border-top: 1px solid #f2f2f2;
    background: #fff;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-clear {
    align-self: center;
    height: auto;
    min-height: 0;
    padding: 4px 0 2px;
    font-size: 0.82rem;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-apply-btn {
    display: none;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-apply-btn-text {
    font-weight: 700;
  }

  .catalog-page:not(.brand-page) .catalog-filters-rail .ff-apply-btn-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5em;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }

  .brand-layout {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    grid-template-areas: "rail main";
    align-items: start;
    gap: 0 24px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
  }

  .brand-layout > .catalog-filters-rail {
    grid-area: rail;
  }

  .brand-layout > .brand-main {
    grid-area: main;
  }

  #brandCategoriesBar,
  #brandFiltersBtn {
    display: none !important;
  }

  .brand-page .brand-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "hero hero"
      "offers sort"
      "applied applied"
      "products products";
    align-items: start;
    column-gap: 20px;
  }

  .brand-page .brand-main .brand-hero {
    grid-area: hero;
  }

  .brand-page .brand-main > .brand-page-heading {
    grid-area: offers;
    margin-bottom: 8px;
    padding: 2px 0 4px;
    min-width: 0;
  }

  .brand-page .brand-main > .brand-sticky-filters {
    grid-area: sort;
    position: static !important;
    width: auto;
    margin: 0;
    padding: 0;
    transform: none !important;
    box-shadow: none !important;
  }

  .brand-page .brand-main > .ff-applied {
    grid-area: applied;
  }

  .brand-page .brand-main > #product-list {
    grid-area: products;
  }

  .brand-main .brand-sticky-filters {
    justify-self: end;
    align-self: start;
  }

  .brand-main .catalog-toolbar {
    position: relative;
    z-index: 102;
    justify-content: flex-end;
    margin-bottom: 0;
    min-height: 42px;
    padding: 0;
  }

  .brand-main .ff-sort-box {
    position: relative;
    z-index: 103;
  }

  .brand-main .ff-sort-box-btn {
    height: 38px;
    padding: 0 4px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .brand-main .ff-sort-box-btn:hover,
  .brand-main .ff-sort-box-btn:focus,
  .brand-main .ff-sort-box-btn.show {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .brand-main .ff-sort-box .dropdown-menu {
    z-index: 1100;
  }

  .brand-page .brand-main .brand-hero.brand-page-section {
    padding-left: 0;
    padding-right: 0;
  }

  .brand-page .brand-main .brand-hero {
    grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
    grid-template-areas: "copy media";
    gap: 1rem 1.25rem;
    align-items: start;
  }

  .brand-page .brand-main .brand-hero-media {
    justify-self: end;
  }

  .brand-page .brand-main .brand-hero-image {
    max-width: 220px;
    max-height: min(220px, 32vh);
    border-radius: 6px;
  }

  .brand-page .brand-main .brand-hero-placeholder {
    max-width: 220px;
    min-height: 140px;
    padding: 1rem;
  }

  .brand-page .brand-main .brand-hero-text {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .brand-page .brand-offers-meta {
    font-size: 0.8rem;
    color: #8a8a8a;
    letter-spacing: 0.03em;
  }

  .brand-page .brand-page-heading {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-page .brand-page-heading p {
    margin: 0;
    text-align: left;
  }

/* Sticky-сайдбар фильтров (бренд) */
  .brand-page .catalog-filters-rail.ff-sheet,
  .brand-page .brand-filters-rail.ff-sheet {
    position: sticky !important;
    top: var(--site-navbar-height, 56px);
    align-self: start;
    z-index: 10;
    display: block;
    pointer-events: auto !important;
    height: auto;
    max-height: none;
  }

  .brand-page .catalog-filters-rail .ff-sheet-backdrop {
    display: none !important;
  }

  .brand-page .catalog-filters-rail .ff-sheet-panel {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none;
    transform: none !important;
    box-shadow: none !important;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    overflow: visible;
    background: #fff;
    padding-left: 0;
  }

  .brand-page .catalog-filters-rail .ff-sheet-drag-handle,
  .brand-page .catalog-filters-rail .menu-drag-handle {
    display: none !important;
  }

  .brand-page .catalog-filters-rail .ff-sheet-close,
  .brand-page .catalog-filters-rail .menu-close-button {
    display: none !important;
  }

  .brand-page .catalog-filters-rail .ff-sheet-header {
    display: none;
  }

  .brand-page .catalog-filters-rail .ff-sheet-body {
    padding: 2px 8px 6px 0;
    overflow: visible;
    flex: 0 0 auto;
  }

  .brand-page .catalog-filters-rail .ff-acc-head {
    padding-left: 0;
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 0.88rem;
  }

  .brand-page .catalog-filters-rail .ff-acc {
    border-bottom: 1px solid #ededed;
  }

  .brand-page .catalog-filters-rail .ff-acc + .ff-acc {
    margin-top: 0;
  }

  /* Каждая раскрытая секция прокручивается отдельно */
  .brand-page .catalog-filters-rail .ff-acc-body {
    max-height: 232px;
    padding: 2px 8px 10px 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #a8a8a8 #f3f3f3;
  }

  .brand-page .catalog-filters-rail [data-acc="size"] .ff-acc-body,
  .brand-page .catalog-filters-rail [data-acc="season"] .ff-acc-body,
  .brand-page .catalog-filters-rail [data-acc="sale"] .ff-acc-body,
  .brand-page .catalog-filters-rail [data-acc="price"] .ff-acc-body {
    max-height: 190px;
  }

  .brand-page .catalog-filters-rail .ff-acc-body::-webkit-scrollbar {
    width: 5px;
  }

  .brand-page .catalog-filters-rail .ff-acc-body::-webkit-scrollbar-track {
    background: #f3f3f3;
    border-radius: 999px;
  }

  .brand-page .catalog-filters-rail .ff-acc-body::-webkit-scrollbar-thumb {
    background: #a8a8a8;
    border-radius: 999px;
  }

  .brand-page .catalog-filters-rail .ff-acc-body::-webkit-scrollbar-thumb:hover {
    background: #777;
  }

  .brand-page .catalog-filters-rail .ff-option {
    min-height: 34px;
    padding: 6px 4px 6px 0;
    border-radius: 0;
  }

  .brand-page .catalog-filters-rail [data-acc="category"] .ff-option input,
  .brand-page .catalog-filters-rail [data-acc="category"] .ff-option-label::before,
  .brand-page .catalog-filters-rail [data-acc="category"] .ff-option-label::after {
    display: none !important;
  }

  .brand-page .catalog-filters-rail [data-acc="category"] .ff-option-label {
    padding-left: 10px;
    font-size: 0.93rem;
  }

  .brand-page .catalog-filters-rail [data-acc="category"] .ff-option.is-selected {
    background: #f5f5f5;
    box-shadow: inset 2px 0 0 #111;
  }

  .brand-page .catalog-filters-rail [data-acc="category"] .ff-option.is-selected .ff-option-label {
    font-weight: 700;
  }

  .brand-page .catalog-filters-rail .ff-sheet-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 0 0 auto;
    gap: 8px;
    padding: 10px 8px 10px 0;
    border-top: 1px solid #f2f2f2;
    background: #fff;
  }

  .brand-page .catalog-filters-rail .ff-clear {
    align-self: center;
    height: auto;
    min-height: 0;
    padding: 4px 0 2px;
    font-size: 0.82rem;
  }

  .brand-page .catalog-filters-rail .ff-apply-btn {
    display: none;
  }

  .brand-page .catalog-filters-rail .ff-apply-btn-text {
    font-weight: 700;
  }

  .brand-page .catalog-filters-rail .ff-apply-btn-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5em;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .brand-page .brand-main .brand-hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "copy";
    gap: 1rem;
  }

  .brand-page .brand-main .brand-hero-media {
    justify-content: flex-start;
    justify-self: start;
  }

  .brand-page .brand-main .brand-hero-image {
    max-width: min(260px, 100%);
    max-height: min(260px, 36vh);
  }
}

/* Лента категорий на странице бренда */
.brand-categories-bar {
  margin: 0 0 1.25rem;
  padding-left: 18px;
  padding-right: 18px;
}

.brand-categories-bar .ff-rail {
  position: relative;
  min-width: 0;
}

.brand-categories-bar .ff-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  grid-auto-columns: max-content;
  align-items: center;
  gap: 8px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
  touch-action: pan-x;
}

.brand-categories-bar .ff-chip {
  height: 38px;
  padding: 0 16px;
  font-size: 15px;
}

/* Если категорий мало — одна линия, без пустой второй строки */
.brand-categories-bar .ff-scroll:has(> .ff-chip:nth-child(1):last-child),
.brand-categories-bar .ff-scroll:has(> .ff-chip:nth-child(2):last-child) {
  grid-template-rows: auto;
}

.brand-categories-bar .ff-scroll::-webkit-scrollbar {
  display: none;
}

.brand-categories-bar .ff-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: auto;
}

.brand-categories-bar .ff-edge[hidden] {
  display: none !important;
}

.brand-categories-bar .ff-edge-left {
  left: 0;
  background: linear-gradient(90deg, #fff 70%, rgba(255, 255, 255, 0));
}

.brand-categories-bar .ff-edge-right {
  right: 0;
  background: linear-gradient(270deg, #fff 70%, rgba(255, 255, 255, 0));
}

.brand-categories-bar .ff-chevron {
  border: 0;
  background: transparent;
  padding: 8px;
  margin: 0;
  color: #222;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-categories-bar .ff-chevron svg {
  width: 18px;
  height: 18px;
  display: block;
}

.brand-sort {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-sort-label {
  font-size: 15px;
  font-weight: 500;
  color: #666;
  white-space: nowrap;
}

.ff-sort-box {
  position: relative;
}

.ff-sort-box-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: auto;
  height: 42px;
  padding: 0 4px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #111;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  box-shadow: none;
}

.ff-sort-box-btn:hover,
.ff-sort-box-btn:focus,
.ff-sort-box-btn.show {
  border-color: transparent;
  background: transparent;
  color: #111;
  box-shadow: none;
}

.ff-sort-box-btn:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.ff-sort-box-btn.dropdown-toggle::after {
  display: inline-block;
  content: "";
  width: 10px;
  height: 10px;
  margin-left: 10px;
  border: 0;
  border-right: 2.5px solid #111;
  border-bottom: 2.5px solid #111;
  vertical-align: middle;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.ff-sort-box-btn.dropdown-toggle.show::after {
  transform: rotate(-135deg);
}

.ff-sort-box-label {
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
  color: #111;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
}

.ff-sort-box-label.is-selected {
  font-weight: 600;
}

.ff-sort-box-label.is-selected::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: #111;
}

.ff-sort-tri {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 5px;
  vertical-align: middle;
  transform: translateY(-1px);
}

.ff-sort-tri-up {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 5px solid currentColor;
}

.ff-sort-tri-down {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transform: translateY(-2px);
}

.ff-sort-box-menu {
  width: 100%;
  min-width: 240px;
  border: 1.3px solid #d2d2d2;
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 6px;
  margin-top: 6px !important;
}

.ff-sort-box-menu .dropdown-item {
  border-radius: 5px;
  color: #222;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 500;
}

.ff-sort-box-menu .dropdown-item:hover,
.ff-sort-box-menu .dropdown-item:focus {
  background: #f6f6f6;
  color: #111;
}

.ff-sort-box-menu .dropdown-item.active {
  background: #f3f3f3;
  color: #111;
  font-weight: 700;
}

.catalog-pagination-btn {
  background: #181818;
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, color 0.15s;
  outline: none;
  padding: 0;
  box-shadow: none;
  text-decoration: none;
}

.catalog-pagination-btn[disabled],
.catalog-pagination-btn:disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.catalog-pagination-btn:focus,
.catalog-pagination-btn:hover {
  background: #000;
  color: #fff;
}

.catalog-pagination-counter {
  min-width: 65px;
  text-align: center;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  color: #181818;
  user-select: none;
}

.brand-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
  margin-bottom: 1.5rem;
}

.brand-toolbar-start {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  min-width: 0;
}

.brand-toolbar-end {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.ff-side-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  border-radius: 7px;
  border: 1.3px solid #d2d2d2;
  background: #fff;
  color: #111;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  box-shadow: none;
  transition: border-color 0.15s;
}

.ff-side-btn:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.ff-side-btn:hover {
  border-color: #bbb;
}

#brandFiltersCount {
  display: inline-block;
  margin-left: 6px;
  font-weight: 700;
}

.ff-applied {
  margin-bottom: 1.25rem;
  padding-left: 18px;
  padding-right: 18px;
}

.ff-applied[hidden] {
  display: none !important;
}

.ff-applied-scroll {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 18px;
}

.ff-tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 7px;
  border: 1.1px solid #e3e3e3;
  background: #f6f6f6;
  color: #222;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background 0.16s, border-color 0.16s;
}

.ff-tag:hover {
  background: #ededed;
  border-color: #ccc;
}

.ff-tag .ff-tag-close {
  margin-left: 9px;
  font-size: 16px;
  line-height: 1;
  color: #999;
}

.ff-clear {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.16s ease;
}

.ff-clear:hover,
.ff-clear:focus-visible {
  background: transparent;
  color: #c41e3a;
  outline: none;
}

.ff-sheet {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: block;
  pointer-events: none;
}

.ff-sheet.is-open {
  pointer-events: auto;
}

.ff-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.ff-sheet.is-open .ff-sheet-backdrop {
  opacity: 1;
}

.ff-sheet-panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 380px;
  max-width: 88vw;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.18);
  transform: translateX(-104%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
}

.ff-sheet.is-open .ff-sheet-panel {
  transform: translateX(0);
}

.ff-sheet-panel--from-right {
  left: auto;
  right: 0;
  transform: translateX(104%);
}

.ff-sheet.is-open .ff-sheet-panel--from-right {
  transform: translateX(0);
}

/* Bottom sheet (фильтры, сортировка) — мобилка и планшет */
@media (max-width: 991.98px) {
  /* Chrome: закрытый sheet выглядывает язычком, когда прячется панель браузера. */
  .ff-sheet {
    visibility: hidden;
    transition: visibility 0s linear 0.3s;
  }

  .ff-sheet.is-open {
    visibility: visible;
    transition-delay: 0s;
  }

  .ff-sheet-panel--from-bottom {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    max-width: none;
    max-height: min(92dvh, 760px);
    height: auto;
    min-height: 0;
    overflow: hidden;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(calc(100% + 80px));
    transition: transform 0.3s ease;
    overscroll-behavior: contain;
  }

  .ff-sheet.is-open .ff-sheet-panel--from-bottom {
    transform: translateY(0);
  }

  .catalog-page .catalog-filters-rail.ff-sheet,
  .brand-page .catalog-filters-rail.ff-sheet {
    position: fixed !important;
    inset: 0;
    z-index: 1050;
    display: block;
    pointer-events: none;
    height: auto;
    max-height: none;
    align-self: auto;
  }

  .catalog-page .catalog-filters-rail.ff-sheet.is-open,
  .brand-page .catalog-filters-rail.ff-sheet.is-open {
    pointer-events: auto;
  }

  .catalog-page .catalog-filters-rail .ff-sheet-backdrop,
  .brand-page .catalog-filters-rail .ff-sheet-backdrop {
    display: block !important;
  }

  .ff-sheet-panel--from-bottom .menu-drag-handle {
    touch-action: none;
    flex-shrink: 0;
    min-height: 36px;
    padding: 10px 16px 6px;
    cursor: grab;
  }

  .ff-sheet-panel--from-bottom .menu-close-button {
    z-index: 2;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ff-sheet-panel--from-bottom .ff-sheet-header {
    padding: 0.5rem 3rem 14px 16px;
    touch-action: none;
    flex-shrink: 0;
    user-select: none;
  }

  .ff-sheet-panel--from-bottom .ff-sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    overscroll-behavior: contain;
  }

  .ff-sheet-panel--from-bottom .ff-sheet-footer {
    flex-shrink: 0;
  }

  .ff-sheet-footer .ff-clear {
    order: 1;
  }

  .ff-sheet-footer .ff-apply-btn {
    order: 2;
  }
}

.ff-sort-sheet-menu {
  list-style: none;
  margin: 0;
  padding: 4px 6px 8px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-width: 0;
  width: 100%;
  position: static !important;
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 4px;
  transform: none !important;
  float: none !important;
}

.ff-sort-sheet-menu > li {
  margin: 0;
  padding: 0;
}

.ff-sort-sheet-menu .dropdown-item {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 10px 10px 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #111;
  font-size: 1.02rem;
  font-weight: 400;
  text-decoration: none;
  transition: background 0.12s ease;
}

.ff-sort-sheet-menu .dropdown-item::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 1.6px solid #111;
  border-radius: 3px;
  background: #fff;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.ff-sort-sheet-menu .dropdown-item::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 6px;
  height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-65%) rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform 0.12s ease;
  pointer-events: none;
}

.ff-sort-sheet-menu .dropdown-item:hover,
.ff-sort-sheet-menu .dropdown-item:focus {
  background: #f6f6f6;
  color: #111;
}

.ff-sort-sheet-menu .dropdown-item.active {
  background: #f3f3f3;
  color: #111;
  font-weight: 600;
}

.ff-sort-sheet-menu .dropdown-item.active::before {
  background: #111;
  border-color: #111;
}

.ff-sort-sheet-menu .dropdown-item.active::after {
  transform: translateY(-65%) rotate(45deg) scale(1);
}

.ff-sheet-header {
  padding: 14px 16px;
  border-bottom: 1px solid #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ff-sheet-title {
  font-size: 1.18rem;
  font-weight: 600;
  margin: 0;
  color: #111;
}

.ff-sheet-close {
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: #333;
  padding: 4px 8px;
}

.ff-sheet-body {
  padding: 8px 18px 12px 10px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.ff-sheet-footer {
  margin-top: auto;
  padding: 16px 12px 22px;
  border-top: 1px solid #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.ff-acc {
  border: 0;
}

.ff-acc + .ff-acc {
  margin-top: 4px;
}

.ff-acc-head {
  position: relative;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 16px 36px 16px 6px;
  font-size: 1.02rem;
  font-weight: 400;
  color: #111;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.ff-acc-head .ff-acc-meta {
  color: #333;
  margin-left: 3px;
}

.ff-acc-body {
  padding: 4px 4px 14px;
}

.ff-acc-body[hidden] {
  display: none;
}

.ff-acc-head .ff-caret {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #111;
  transition: transform 0.18s ease;
}

.ff-acc-head[aria-expanded="true"] .ff-caret {
  transform: translateY(-50%) rotate(-180deg);
}

.ff-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.ff-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease;
}

.ff-option:hover {
  background: #f6f6f6;
}

.ff-option[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
}

.ff-option input {
  pointer-events: none;
}

.ff-option-label {
  flex: 1 1 auto;
  color: #111;
}

.ff-option-count {
  color: #777;
  font-weight: 600;
}

.ff-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ff-option .ff-option-label {
  position: relative;
  padding-left: 28px;
}

.ff-option .ff-option-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 1.6px solid #111;
  border-radius: 3px;
  background: #fff;
}

.ff-option .ff-option-label::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 6px;
  height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-65%) rotate(45deg) scale(0);
  pointer-events: none;
}

.ff-option input[type="checkbox"]:checked + .ff-option-label::before {
  background: #111;
  border-color: #111;
}

.ff-option input[type="checkbox"]:checked + .ff-option-label::after {
  transform: translateY(-65%) rotate(45deg) scale(1);
}

.ff-option.ff-no-check .ff-option-label::before,
.ff-option.ff-no-check .ff-option-label::after {
  display: none !important;
}

.ff-option.ff-no-check .ff-option-label {
  padding-left: 0;
}

.ff-color-chip {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid #d4d4d4;
}

.ff-option.is-selected {
  background: #f3f3f3;
}

.ff-option.is-selected .ff-option-label {
  font-weight: 600;
}

.ff-option.is-selected .ff-color-chip {
  box-shadow: 0 0 0 2px #111 inset, 0 0 0 2px #111;
}

.ff-sizes-systems {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.ff-size-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #d7d7d7;
  background: #fff;
  cursor: pointer;
  color: #111;
}

.ff-size-chip:hover {
  background: #f7f7f7;
}

.ff-size-chip.is-selected {
  border-color: #111;
  font-weight: 700;
}

.ff-size-chip[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
}

.ff-apply-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.ff-apply-btn-text {
  font-weight: 700;
}

.ff-apply-btn-count {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ff-apply-btn:hover {
  background: #000;
}

.ff-apply-btn[disabled] {
  opacity: 0.6;
  cursor: default;
}

@media (max-width: 768px) {
  .product-image-area {
    height: 240px !important;
  }

  .catalog-pagination-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    border-radius: 8px;
  }

  .catalog-pagination-counter {
    font-size: 1rem;
    min-width: 50px;
  }

  .catalog-pagination-block {
    min-height: 50px;
  }

  .catalog-pagination-inner {
    gap: 0.5rem;
  }

  .ff-chip {
    height: 36px;
    font-size: 15px;
    padding: 0 12px;
  }

  .ff-sort-box-btn {
    height: 36px;
    font-size: 15px;
  }

  .ff-sort-box-label {
    font-size: 15px;
  }

  .ff-sort-box-menu {
    min-width: 200px;
  }

  .ff-sort-box .dropdown-menu {
    display: none !important;
  }

  .brand-categories-bar {
    padding-left: 6px;
    padding-right: 6px;
    margin-bottom: 0.55rem;
  }

  .brand-categories-bar .ff-edge {
    display: none !important;
  }

  .brand-categories-bar .ff-rail {
    display: block;
  }

  /* Мобилка: одна линия категорий */
  .brand-categories-bar .ff-scroll {
    display: flex;
    flex-wrap: nowrap;
    grid-auto-flow: unset;
    grid-template-rows: unset;
    grid-auto-columns: unset;
    gap: 7px;
  }

  .brand-categories-bar .ff-chip {
    height: 32px;
    font-size: 14px;
    padding: 0 10px;
  }

  .catalog-sticky-filters .catalog-toolbar {
    margin-bottom: 0.85rem;
  }

  .catalog-toolbar {
    padding-left: 6px;
    padding-right: 6px;
  }

  .ff-applied {
    padding-left: 6px;
    padding-right: 6px;
    margin-bottom: 1rem;
  }

  .ff-side-btn {
    height: 36px;
    font-size: 15px;
    padding: 0 12px;
  }
}
