/* Страница каталога WooCommerce */

/* Заголовок каталога с переключателем вида */
.catalog-page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 20px;
}

.catalog-page__header .h2-title {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 20px;
  font-size: 22px;
}

.catalog-page__count {
  font-size: 22px;
  color: #424242;
  font-weight: 500;
}

.catalog-page__view-switcher {
  display: flex;
  gap: 20px;
}

.view-btn {
  width: auto;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  padding: 0;
  background: transparent;
}

.view-btn:hover svg {
 opacity: 1;
}

.view-btn svg {
  opacity: .1;
  transition: all 0.2s ease;
}

.view-btn.active svg{
  opacity: 1;
}

/* Вид списком для товаров - ТОЛЬКО НА ДЕСКТОПЕ */
@media (min-width: 992px) {
  .catalog-page__items.list-view {
    grid-template-columns: 100%;
  }

  .catalog-page__items.list-view .bestseller__item {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: 200px 1fr auto;
    grid-template-rows: auto auto 1fr auto;
    gap: 12px 20px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    align-items: start;
    position: relative;
  }

  /* Фото - занимает все строки слева */
  .catalog-page__items.list-view .bestseller__item > a {
    grid-column: 1;
    grid-row: 1 / 5;
  }

  .catalog-page__items.list-view .bestseller__image {
    width: 200px;
    height: 200px;
    object-fit: cover;
  }

  /* Артикул */
  .catalog-page__items.list-view .bestseller__name {
    grid-column: 2;
    grid-row: 1;
    font-size: 14px;
    color: #888;
  }

  /* Заголовок */
  .catalog-page__items.list-view .bestseller__title {
    grid-column: 2;
    grid-row: 2;
    font-size: 18px;
    margin: 0;
  }

  /* Цена - по центру */
  .catalog-page__items.list-view .bestseller__price {
    grid-column: 2;
    grid-row: 3;
    font-size: 24px;
    font-weight: 700;
    align-self: center;
  }

  /* Кнопки действий */
  .catalog-page__items.list-view .bestseller__actions {
    grid-column: 2;
    grid-row: 4;
    align-self: end;
  }

  /* Бейджи */
  .catalog-page__items.list-view .bestseller-budge {
    position: absolute;
    top: 20px;
    left: 20px;
  }
}

/* Скрываем переключатель вида на мобилке */
@media (max-width: 991px) {
  .catalog-page__view-switcher {
    display: none;
  }
}

/* Адаптив для заголовка */
@media (max-width: 768px) {
  .catalog-page__header {
    margin-bottom: 20px;
  }
  
  .catalog-page__header .h2-title {
    font-size: 20px;
  }
  
  .catalog-page__count {
    font-size: 16px;
  }
}

.filter-panel {
  background: #fff;
  border-radius: 16px;
  width: 280px;
  padding: 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.07);
  border: 1px solid #adadad;
  overflow: hidden;
}

.filter-section {
  padding: 22px 22px;
  border-bottom: 1px solid #f0ede8;
}

.filter-section:last-child {
  border-bottom: none;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: #424242;
  margin-bottom: 20px;
}

/* Sort options */
.sort-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sort-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 14px;
  font-weight: 500;
  color: #444;
  user-select: none;
}

.sort-item:hover {
  background: #f7f5f2;
}

.sort-item.active {
  background: var(--color-light);
  color: var(--color-gray);
}

.sort-item svg {
  width: 16px;
  height: 16px;
}

/* Availability checkboxes */
.check-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  user-select: none;
}

.check-label input {
  display: none;
}

.check-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid #ccc;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
  background: #fff;
}

.check-label input:checked + .check-box {
  background: #1a1a1a;
  border-color: #1a1a1a;
}

.check-box svg {
  width: 11px;
  height: 11px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.15s ease;
}

.check-label input:checked + .check-box svg {
  opacity: 1;
  transform: scale(1);
}

/* Price range */
.price-inputs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.price-input {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid #e8e4df;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  background: #faf9f7;
  outline: none;
  transition: border-color 0.15s ease;
  width: 100%;
}

.price-input:focus {
  border-color: #1a1a1a;
  background: #fff;
}

/* Dual range slider */
.range-container {
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
}

.range-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: #e8e4df;
  border-radius: 2px;
  transform: translateY(-50%);
}

.range-fill {
  position: absolute;
  height: 100%;
  background: #1a1a1a;
  border-radius: 2px;
  left: 0%;
  right: 0%;
}

.range-slider {
  position: absolute;
  width: 100%;
  height: 4px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
  outline: none;
  margin: 0;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1a1a1a;
  cursor: pointer;
  pointer-events: all;
  border: 3px solid #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.range-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1a1a1a;
  cursor: pointer;
  pointer-events: all;
  border: 3px solid #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

/* Brand */
.brand-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.apply-btn {
  display: block;
  width: calc(100% - 44px);
  margin: 22px 22px;
  padding: 13px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s ease, transform 0.1s ease;
}

.apply-btn:hover {
  background: #333;
  transform: translateY(-1px);
}

.apply-btn:active {
  transform: translateY(0);
}

.catalog-page__wrapp {
  display: flex;
  gap: 20px;
}

.catalog-page__items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px,1fr));
  grid-gap: 30px 20px;
}

.catalog-page__items .bestseller__item {
  height: auto;
}

.catalog-page__right {
  flex: 1;
}

@media (width < 768px){
  .catalog-page__wrapp{
    flex-direction: column;
  }
  body .spf-filter-panel{
    border: none;
    box-shadow: none;
    overflow: visible;
  }
  body .spf-mobile-toggle{
    width: 100%;
    justify-content: center;
  }
}


@media (width < 600px){
  .catalog-page__items{
    grid-template-columns:repeat(auto-fill, minmax(135px,1fr));
    grid-gap: 20px 10px;
  }
}