/* === BrainyFilter Hamudi Overrides — loads AFTER brainyfilter.css === */

/* ---- Desktop: filter panel ---- */

/* Container */
.bf-panel-wrapper .box {
  border: none;
  border-radius: 0;
  margin-bottom: 0;
}

/* Section headers */
.brainyfilter-panel .bf-attr-header {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1a2f10;
  background: #fff;
  border: none;
  border-bottom: 1px solid #e0ddd6;
  padding: 12px 0;
  border-radius: 0;
}
.brainyfilter-panel .bf-attr-header.bf-w-line {
  border-style: none none solid;
}

/* Group headers */
.brainyfilter-panel .bf-attr-group-header {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: #f7f4ef;
  color: #1a2f10;
  border: none;
  border-radius: 0;
  padding: 10px 12px;
}

/* Rows & cells */
.brainyfilter-panel .bf-attr-block-cont { padding: 4px 0; }
.brainyfilter-panel .bf-c-1 { width: 18px; padding-right: 8px; }
.brainyfilter-panel .bf-cell { padding: 5px 0; border-bottom: none; }

/* Labels */
.brainyfilter-panel .bf-cell label {
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #1b1b1b;
  cursor: pointer;
  transition: color 0.2s;
}
.brainyfilter-panel .bf-cell label:hover { color: var(--a-color); }
.brainyfilter-panel .bf-disabled label { color: #999; }

/* Count badges */
.brainyfilter-panel .bf-count {
  background: #f7f4ef;
  color: #888;
  font-size: 11px;
  font-weight: 400;
  border-radius: 0;
  padding: 1px 5px;
  line-height: 18px;
}
.brainyfilter-panel .bf-count.bf-empty { background: #f5f5f5; color: #ccc; }

/* Checkboxes */
.brainyfilter-panel .bf-attr-filter input[type="checkbox"],
.brainyfilter-panel .bf-attr-filter input[type="radio"] {
  accent-color: var(--a-color);
}

/* Price slider */
.brainyfilter-panel .ui-widget-header { background: var(--a-color); }
.brainyfilter-panel .ui-widget-content { background: #f7f4ef; border: 1px solid #e0ddd6; }
.brainyfilter-panel .ui-state-default { background: #fff; border: 1px solid #e0ddd6; }

/* Clear button */
.brainyfilter-panel .bf-buttonclear {
  font-family: 'Open Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--a-color);
  background-color: #fff;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  border: 0;
  cursor: pointer;
}
.brainyfilter-panel .bf-buttonclear:hover { color: var(--a-color-hover); }

/* Show more */
.brainyfilter-panel .bf-sliding-show {
  font-family: 'Open Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--a-color);
  padding: 6px 0;
}

/* Arrow */
.brainyfilter-panel .bf-cross,
.brainyfilter-panel .bf-close-btn,
.brainyfilter-panel .bf-arrow {
  font-family: 'Open Sans', sans-serif;
  color: #1b1b1b;
}

/* Inputs */
.brainyfilter-panel .bf-slider-inputs input[type="text"],
.brainyfilter-panel .bf-search-container input[type="text"] {
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  border: 1px solid #e0ddd6;
  padding: 4px 6px;
}
.brainyfilter-panel .bf-search-container input[type="text"]:focus {
  border-color: var(--a-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.1);
}

/* ---- Mobile: full-screen filter panel ---- */

/* Panel slides from left, full screen */
.bf-responsive.bf-active .bf-check-position {
  position: fixed !important;
  top: 0 !important;
  left: -100% !important;
  right: auto !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  z-index: 10000;
  background: #fff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: left 0.3s ease;
  padding: 52px 0 20px;
}
.bf-responsive.bf-active.bf-opened .bf-check-position {
  left: 0 !important;
}

/* Filter open button — fixed bottom center */
.bf-responsive.bf-active .bf-btn-show,
.bf-responsive.bf-active.bf-left .bf-btn-show,
.bf-responsive.bf-active.bf-right .bf-btn-show,
.bf-responsive.bf-active.bf-layout-id-32 .bf-btn-show {
  position: fixed;
  bottom: 20px;
  left: 50%;
  top: auto !important;
  right: auto;
  transform: translateX(-50%);
  width: auto;
  height: 44px;
  padding: 0 24px;
  background: var(--button-color) !important;
  color: #fff;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 10001;
  cursor: pointer;
  box-sizing: border-box;
}

.bf-responsive.bf-active .bf-btn-show::before {
  content: '' !important;
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  float: none !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.5'%3E%3Cline x1='4' y1='6' x2='20' y2='6'/%3E%3Cline x1='4' y1='12' x2='16' y2='12'/%3E%3Cline x1='4' y1='18' x2='12' y2='18'/%3E%3C/svg%3E") no-repeat !important;
  background-size: 18px 18px !important;
}

.bf-responsive.bf-active .bf-btn-show::after {
  content: 'Фільтр' !important;
  display: block !important;
  float: none !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  background-image: none !important;
}

/* Close button — top right inside panel */
.bf-responsive.bf-active.bf-opened .bf-btn-reset,
.bf-responsive.bf-active.bf-opened.bf-left .bf-btn-reset,
.bf-responsive.bf-active.bf-opened.bf-right .bf-btn-reset,
.bf-responsive.bf-active.bf-layout-id-32.bf-opened .bf-btn-reset {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  width: 52px !important;
  height: 52px !important;
  padding: 0 !important;
  background: #fff !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  box-shadow: none;
  border-radius: 0;
  cursor: pointer;
  box-sizing: border-box;
}

.bf-responsive.bf-active.bf-opened .bf-btn-reset::before {
  content: '' !important;
  display: block !important;
  float: none !important;
  width: 22px !important;
  height: 22px !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%231d1d1b' stroke-width='1.5' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") no-repeat !important;
  background-size: 22px 22px !important;
}

/* Mobile panel content spacing */
.bf-responsive.bf-active .box-heading,
.bf-responsive.bf-active .box-content {
  border-radius: 0;
  border-width: 0;
}
.bf-responsive.bf-active .box-heading {
  border-bottom-width: 0;
  padding-left: 10px;
  padding-right: 10px;
}
.bf-responsive.bf-active .box-heading * {
  display: none;
}

.bf-responsive.bf-active .bf-buttonclear-box {
  display: block;
  padding: 20px;
  text-align: center;
}
.bf-responsive.bf-active .bf-buttonclear {
  display: block;
  width: 100%;
  height: 44px;
  font-size: 14px;
  padding: 0;
  border: 1.5px solid var(--a-color);
  color: var(--a-color);
  text-align: center;
  text-transform: none;
  letter-spacing: 0.03em;
  box-sizing: border-box;
  line-height: 44px;
  border-radius: 50px;
}

.bf-responsive.bf-active .bf-attr-block-cont {
  position: relative;
  width: 100% !important;
  padding: 8px 20px;
}
.bf-responsive.bf-active .bf-attr-header {
  padding: 14px 20px;
  font-size: 13px;
}
.bf-responsive.bf-active .bf-attr-group-header {
  padding: 12px 20px;
  font-size: 14px;
}
.bf-responsive.bf-active .bf-cell {
  padding: 10px 0;
}
.bf-responsive.bf-active .bf-cell label {
  font-size: 15px;
}
.bf-responsive.bf-active .bf-count {
  font-size: 12px;
  padding: 2px 6px;
}
.bf-responsive.bf-active .bf-c-1 {
  width: 22px;
  padding-right: 10px;
}
.bf-responsive.bf-active input[type="checkbox"] {
  width: 18px;
  height: 18px;
}
.bf-responsive.bf-active .bf-sliding-show {
  font-size: 13px;
  padding: 10px 20px;
}
.bf-responsive.bf-active .bf-sliding-cont {
  margin-top: 0 !important;
}
.bf-responsive.bf-active .bf-left-half {
  float: none;
  width: auto;
}

.bf-responsive.bf-active.bf-panel-wrapper.bf-panel-hidden {
  opacity: 0.9;
}
.bf-responsive.bf-active .ajax-shadow {
  position: fixed;
  background: url("../image/brainyfilter/loading-big.gif") no-repeat 50% 50%;
}

/* Retina overrides for custom icons */
@media
only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min-resolution: 144dpi),
only screen and (min-resolution: 1.5dppx) {
  .bf-responsive.bf-active .bf-btn-show::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.5'%3E%3Cline x1='4' y1='6' x2='20' y2='6'/%3E%3Cline x1='4' y1='12' x2='16' y2='12'/%3E%3Cline x1='4' y1='18' x2='12' y2='18'/%3E%3C/svg%3E") !important;
    background-size: 18px 18px !important;
  }
  .bf-responsive.bf-active .bf-btn-show::after {
    background-image: none !important;
  }
  .bf-responsive.bf-active .bf-btn-reset::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%231d1d1b' stroke-width='1.5' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") !important;
    background-size: 22px 22px !important;
  }
}
