/* Доповнення до Ultimo: сторінка категорії (локальні фільтри без Magento AJAX). */

/* Ліва колонка: широкий контент сайдбару не ламає сітку */
.catalog-category-view .col-left.sidebar {
  overflow-x: auto;
  max-width: 100%;
}

/* Сітка товарів без float Ultimo — три колонки задаються в home-blocks.css */
.catalog-category-view ul.category-products-grid.category-products-grid--3col {
  display: grid;
  float: none;
  width: 100%;
  clear: both;
}

.catalog-category-view ul.category-products-grid.category-products-grid--3col > .item {
  float: none;
  width: auto !important;
  max-width: 100%;
  clear: none !important;
  list-style: none;
}

/* Панель сортування в col-main (не плутати з .mobile-sort у сайдбарі) */
.category-page-toolbar--sort {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px 16px;
  margin-bottom: 20px;
}

.category-page-toolbar__sort-label {
  font-size: 14px;
  font-weight: 700;
  color: #1c1c1c;
  line-height: 1.2;
  white-space: nowrap;
}

.category-sort-bar__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-sort-bar__item {
  margin: 0;
  padding: 0;
}

.category-sort-bar__link {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 500;
  color: #1c1c1c;
  text-decoration: none;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  background: #f7f7f7;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.category-sort-bar__link:hover {
  background: #eee;
  border-color: #b8b8b8;
  color: #000;
}

.category-sort-bar__link--active {
  font-weight: 700;
  background: #fff;
  border-color: #1c1c1c;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.category-sort-bar + h2.category-section-heading {
  margin-top: 1.5rem;
}

.category-filter-form .filter-list-checkboxes label {
  display: block;
  margin: 6px 0;
}

.category-filter-form .category-filter-grouped-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  padding: 4px 6px;
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.category-filter-form .category-filter-grouped-row:hover {
  background-color: #f1efff;
}

.category-filter-form .category-filter-grouped-row__check {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 1px solid #b4b4b4;
  border-radius: 3px;
  background: #fff;
  position: relative;
}

.category-filter-form .category-filter-grouped-row--active .category-filter-grouped-row__check {
  background: #6c4cf1;
  border-color: #6c4cf1;
}

.category-filter-form .category-filter-grouped-row--active .category-filter-grouped-row__check::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.category-filter-form .category-filter-grouped-row--active {
  background-color: #efeaff;
}

/* «Ви обрали» — блок фільтрів */
.category-filter-currently {
  margin-bottom: 18px;
  padding: 12px 14px;
  background: #f0f0f0;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
}

.category-filter-currently__title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #1c1c1c;
}

.category-filter-currently__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-filter-currently__item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.35;
  color: #606060;
}

.category-filter-currently__item:last-child {
  margin-bottom: 0;
}

.category-filter-currently__remove {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #737373;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.category-filter-currently__remove:hover {
  color: #2295d4;
}

.category-filter-currently__remove-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.category-filter-currently__remove-svg {
  display: block;
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

.category-filter-currently__text {
  flex: 1;
}

.category-filter-currently__actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e0e0e0;
}

.category-filter-currently__clear-all {
  font-size: 13px;
  color: #2295d4;
  text-decoration: none;
}

.category-filter-currently__clear-all:hover {
  text-decoration: underline;
}

.category-filter-form .filter-actions {
  margin: 16px 0 0;
}

.category-filter-form .category-filter-reset-link {
  display: inline;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: #2295d4;
  text-decoration: underline;
  cursor: pointer;
}

.category-filter-form .category-filter-reset-link:hover {
  color: #1a7aad;
}

/* Бренд / колір / SIM: квадрат + темна галочка */
.category-filter-form .category-filter-choices label {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  cursor: pointer;
}

.category-filter-form .category-filter-choices .category-filter-choice__text {
  flex: 1 1 auto;
  min-width: 0;
}

.category-filter-form .category-filter-choices .category-filter-choice__text .count {
  margin-left: 0;
  float: none;
  white-space: nowrap;
}

.category-filter-form .category-filter-choices input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid #c8c8c8;
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
}

.category-filter-form .category-filter-choices input[type="checkbox"]:checked {
  background: #e0e0e0;
  border-color: #b0b0b0;
}

.category-filter-form .category-filter-choices input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 9px;
  border: solid #333;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.category-filter-form .category-filter-choices input[type="checkbox"]:focus-visible {
  outline: 2px solid #2295d4;
  outline-offset: 2px;
}

.category-price-dual-slider {
  --slider-h: 36px;
  --track-h: 6px;
  --thumb: 18px;
  --track-top: calc((var(--slider-h) - var(--track-h)) / 2);
  /* Зсув темної смуги заповнення вниз (вирівнювання з сірим треком / ручками) */
  --price-fill-nudge-y: 8px;
  /* Підняти кружки відносно смуги (негатив = вгору) */
  --thumb-nudge-y: -5px;
  padding: 6px 0 10px;
}

/* Одна вісь: сіра доріжка, темна смуга між ручками, круглі повзунки без стрілок */
.category-price-dual-slider__track-wrap {
  position: relative;
  height: var(--slider-h);
  margin-bottom: 12px;
}

.category-price-dual-slider__fill {
  position: absolute;
  left: 0;
  top: calc(var(--track-top) + var(--price-fill-nudge-y));
  width: 0;
  height: var(--track-h);
  margin: 0;
  border-radius: 999px;
  background: #1a1a1a;
  transform: none;
  /* Над суцільним сірим ::before, під ручками high */
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  box-sizing: border-box;
}

.category-price-dual-slider__track {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: var(--slider-h);
}

/* Одна суцільна сіра смуга на всю ширину (без «напівпрозорості» зліва через подвійний трек low+high) */
.category-price-dual-slider__track::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--track-top) + var(--price-fill-nudge-y));
  height: var(--track-h);
  border-radius: 999px;
  background: #e2e2e2;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  z-index: 0;
  pointer-events: none;
}

.category-price-dual-slider__range {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  height: var(--slider-h);
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.category-price-dual-slider__range--low {
  z-index: 2;
}

.category-price-dual-slider__range--high {
  z-index: 3;
}

.category-price-dual-slider__range::-webkit-slider-runnable-track {
  height: var(--track-h);
  margin-top: calc(var(--track-top) + var(--price-fill-nudge-y));
  background: transparent;
  border-radius: 999px;
  box-shadow: none;
}

.category-price-dual-slider__range::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
  width: var(--thumb);
  height: var(--thumb);
  margin-top: calc((var(--track-h) - var(--thumb)) / 2 + var(--thumb-nudge-y));
  border-radius: 50%;
  border: 1px solid #bdbdbd;
  background: linear-gradient(180deg, #f4f4f4 0%, #e4e4e4 100%);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  cursor: grab;
}

.category-price-dual-slider__range::-webkit-slider-thumb:active {
  cursor: grabbing;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.category-price-dual-slider__range::-moz-range-track {
  height: var(--track-h);
  margin-top: var(--price-fill-nudge-y);
  background: transparent;
  border-radius: 999px;
  box-shadow: none;
}

.category-price-dual-slider__range::-moz-range-thumb {
  pointer-events: auto;
  width: var(--thumb);
  height: var(--thumb);
  transform: translateY(var(--thumb-nudge-y));
  border-radius: 50%;
  border: 1px solid #bdbdbd;
  background: linear-gradient(180deg, #f4f4f4 0%, #e4e4e4 100%);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  cursor: grab;
}

.category-price-dual-slider__range::-moz-range-thumb:active {
  cursor: grabbing;
}

.category-price-dual-slider__combined {
  margin: 0 0 6px;
  font-size: 13px;
  color: #606060;
  text-align: center;
}

.category-price-dual-slider .note-range {
  margin: 0 0 8px;
  font-size: 12px;
  color: #909090;
  text-align: center;
  margin-bottom: -10px;
}

.category-pagination ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.category-pagination a,
.category-pagination span {
  display: inline-block;
  padding: 6px 10px;
}

.category-pagination .current {
  font-weight: bold;
}
