/* SW filter — Sakura brand (#A9236C) */
.swf-filter {
  position: relative;
  margin: 0 0 20px;
  border-radius: 12px;
  outline: 2px solid rgba(169, 35, 108, 0.35);
  outline-offset: 2px;
}
.swf-filter__toggle {
  display: none;
  width: 100%;
  margin: 0 0 12px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #A9236C;
  border: 0;
  border-radius: 8px;
  touch-action: manipulation;
}
.swf-filter__toggle:hover,
.swf-filter__toggle:focus { background: #8e1c5a; color: #fff; }
.swf-filter__panel {
  background: #fff;
  border: 2px solid #A9236C;
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 2px 12px rgba(169, 35, 108, 0.14);
}
.swf-filter__head,
.swf-filter--revolution .box-heading.swf-filter__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 14px 16px;
  font-size: 17px;
  font-weight: 700;
  color: #333;
  background: #fdf7fa;
  border-bottom: 1px solid #f0e4ec;
  border-radius: 10px 10px 0 0;
}
.swf-filter__head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.swf-filter__reset {
  border: 0;
  background: transparent;
  color: #A9236C;
  font-size: 13px;
  text-decoration: underline;
  padding: 0;
  cursor: pointer;
}
.swf-filter__close {
  display: none;
  border: 0;
  background: transparent;
  color: #666;
  font-size: 24px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}
.swf-filter .box-content { padding: 14px 16px 16px; }
.swf-filter__total {
  font-size: 13px;
  color: #666;
  margin: 0 0 12px;
  padding: 8px 10px;
  background: #faf6f8;
  border-radius: 6px;
}
.swf-filter__group {
  margin: 0 0 14px;
  padding: 0 0 12px;
  border-bottom: 1px solid #f3e8ee;
}
.swf-filter__group:last-of-type { border-bottom: 0; }
.swf-filter__group-title {
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 10px;
  color: #333;
}
.swf-filter__values { list-style: none; margin: 0; padding: 0; }
.swf-filter__value { margin: 0; padding: 0; }
.swf-filter__values label,
.swf-filter__values .checkbox-custom {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 400;
  font-size: 14px;
  color: #444;
  cursor: pointer;
  margin: 6px 0;
  line-height: 1.35;
  min-height: 44px;
}
.swf-filter__values input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #A9236C;
  flex-shrink: 0;
}
.swf-filter__value.disabled { opacity: 0.4; pointer-events: none; }
.swf-count { color: #999; font-style: normal; font-size: 12px; }
.swf-price-slider__labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
}
.swf-price-slider__track { position: relative; height: 28px; }
.swf-price-slider__track::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  margin-top: -2px;
  background: #f0e4ec;
  border-radius: 2px;
}
.swf-price-slider__range {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 4px;
  margin-top: -2px;
  background: #A9236C;
  border-radius: 2px;
  pointer-events: none;
}
.swf-price-slider__track input[type="range"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 28px;
  margin: 0;
  padding: 0;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}
.swf-price-slider__track input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: all;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #A9236C;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.swf-price-slider__track input[type="range"]::-moz-range-thumb {
  pointer-events: all;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #A9236C;
  cursor: pointer;
}
.swf-price-slider__track .swf-price-range-min,
.swf-price-slider__track .swf-rose-range-min { z-index: 3; }
.swf-price-slider__track .swf-price-range-max,
.swf-price-slider__track .swf-rose-range-max { z-index: 4; }
.swf-price-slider__selected {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}
.swf-price-slider__sep { color: #999; font-weight: 400; }
.swf-filter__apply,
.swf-filter__apply.btn-primary {
  margin-top: 12px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #A9236C;
  border: 0;
  border-radius: 8px;
  min-height: 48px;
  touch-action: manipulation;
}
.swf-filter__apply:hover { background: #8e1c5a; color: #fff; }
.swf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.swf-chip {
  background: #f3e8ee;
  color: #6b3a55;
  border-radius: 14px;
  padding: 6px 10px;
  font-size: 12px;
}
.swf-chip button {
  border: 0;
  background: transparent;
  color: #A9236C;
  font-size: 14px;
  line-height: 1;
  padding: 0 0 0 4px;
  cursor: pointer;
}
.swf-loader {
  display: none;
  height: 3px;
  background: linear-gradient(90deg, #e8b4cb, #A9236C, #e8b4cb);
  background-size: 200% 100%;
  animation: swf-load 1s linear infinite;
  margin-top: 8px;
  border-radius: 2px;
}
.swf-filter.swf-loading .swf-loader { display: block; }
.swf-filter.swf-loading .swf-filter__apply { opacity: 0.6; pointer-events: none; }
@keyframes swf-load { 0% { background-position: 0 0; } 100% { background-position: 200% 0; } }
.swf-filter--revolution .swf-filter__panel { border: 1px solid #f0e4ec; }

/* Desktop: панель всегда видна, кнопка «Фильтр» скрыта */
@media (min-width: 768px) {
  .swf-filter--mobile-drawer .swf-filter__toggle { display: none; }
  .swf-filter--mobile-drawer .swf-filter__overlay { display: none; }
  .swf-filter--mobile-drawer .swf-filter__close { display: none; }
  .swf-filter--mobile-drawer .swf-filter__panel {
    position: static;
    width: auto;
    max-width: none;
    height: auto;
    left: auto;
    overflow: visible;
    box-shadow: 0 2px 10px rgba(169, 35, 108, 0.06);
    border-radius: 10px;
  }
}

/* Mobile: drawer + кнопка «Фильтр» */
@media (max-width: 767px) {
  #column-left.sakura-col-left {
    display: block;
    width: 100%;
    float: none;
    padding: 0 15px 8px;
  }
  #column-left.sakura-col-left > *:not(#swf-filter):not(.swf-filter) {
    display: none;
  }
  .sakura-catalog-row {
    display: flex;
    flex-direction: column;
  }
  .sakura-catalog-row #column-left.sakura-col-left { order: 1; }
  .sakura-catalog-row #content { order: 2; width: 100%; }

  .swf-filter--mobile-drawer .swf-filter__toggle {
    display: block;
    position: sticky;
    top: 52px;
    z-index: 100;
  }
  .swf-filter--mobile-drawer .swf-filter__overlay { display: none; }
  .swf-filter--mobile-drawer .swf-filter__panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 88%;
    max-width: 340px;
    height: 100%;
    z-index: 10050;
    overflow-y: auto;
    transition: transform .25s ease;
    transform: translateX(-105%);
    box-shadow: 4px 0 20px rgba(0,0,0,.18);
    border-radius: 0;
  }
  .swf-filter--mobile-drawer.swf-filter--open .swf-filter__panel {
    display: block;
    transform: translateX(0);
  }
  .swf-filter--mobile-drawer.swf-filter--open .swf-filter__overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 10040;
  }
  .swf-filter--mobile-drawer .swf-filter__close { display: inline-block; }
  .swf-filter__toggle { font-size: 16px; padding: 14px 16px; min-height: 48px; }
  .swf-filter.swf-has-chips .swf-filter__toggle {
    box-shadow: 0 0 0 2px rgba(169, 35, 108, 0.25);
  }
}

/* AJAX-карточки фильтра: та же сетка/кнопка, что в каталоге */
.swf-products > .product-layout {
  display: flex;
  flex-direction: column;
}
.swf-products .product-thumb {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.swf-products .product-thumb > .caption {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.swf-products .product-thumb .product_buttons {
  margin-top: auto;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 10px 12px 14px;
}
.swf-products .product-thumb .cart {
  flex: 1 1 auto;
  min-width: 0;
}
.swf-products .product-thumb .cart a i.fa-shopping-basket:before {
  display: none !important;
  content: none !important;
}
.swf-products .product-thumb .cart .prlistb,
.swf-products .product-thumb .cart span.prlistb {
  display: inline !important;
  color: inherit !important;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.swf-empty,
.swf-products-empty .swf-empty {
  margin: 24px 0;
  padding: 28px 20px;
  text-align: center;
  font-size: 16px;
  line-height: 1.45;
  color: #4b5563;
  background: #faf7f9;
  border: 1px dashed rgba(169, 35, 108, 0.35);
  border-radius: 10px;
}
