.takfaz-filters-root {
  direction: rtl;
  font-family: inherit;
}

.tkf-filters-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tkf-filter-loading {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.tkf-filter-loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e8e8e8;
  border-top-color: #2979ff;
  border-radius: 50%;
  animation: tkf-spin 0.7s linear infinite;
}

@keyframes tkf-spin {
  to { transform: rotate(360deg); }
}

.tkf-filter-error {
  text-align: center;
  padding: 20px;
  color: #c00;
  font-size: 14px;
}

.tkf-filter-clear {
  margin-bottom: 4px;
}

.tkf-filter-clear-btn {
  width: 100%;
  padding: 8px 16px;
  border: 1px solid #ff0000;
  background: #fff;
  color: #ff0000;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  font-family: inherit;
}

.tkf-filter-clear-btn:hover {
  background: #ff0000;
  color: #fff;
}

.tkf-filter-section {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  overflow: hidden;
}

.tkf-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.tkf-section-header:hover {
  background: #fafafa;
}

.tkf-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #222;
}

.tkf-section-arrow {
  width: 20px;
  height: 20px;
  position: relative;
  transition: transform 0.25s;
}

.tkf-section-arrow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-left: 2px solid #666;
  border-bottom: 2px solid #666;
  transform: translate(-50%, -60%) rotate(-45deg);
  transition: transform 0.25s;
}

.tkf-section-arrow.tkf-open::before {
  transform: translate(-50%, -30%) rotate(135deg);
}

.tkf-section-body {
  padding: 0 16px 14px;
}

.tkf-stock-section {
  padding: 14px 16px;
}

.tkf-stock-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.tkf-stock-toggle:active {
  opacity: 0.6;
}

.tkf-stock-label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.tkf-switch {
  width: 42px;
  height: 24px;
  border-radius: 12px;
  background: #ccc;
  position: relative;
  transition: background 0.25s;
  flex-shrink: 0;
}

.tkf-switch-on {
  background: #2979ff;
}

.tkf-switch-knob {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 3px;
  right: 3px;
  transition: right 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.tkf-switch-on .tkf-switch-knob {
  right: 21px;
}

.tkf-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  margin-bottom: 8px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.tkf-search-input:focus {
  border-color: #2979ff;
}

.tkf-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow-y: auto;
}

.tkf-list::-webkit-scrollbar {
  width: 4px;
}

.tkf-list::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 2px;
}

.tkf-list::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

.tkf-list-item {
  border-bottom: 1px solid #f5f5f5;
}

.tkf-list-item:last-child {
  border-bottom: none;
}

.tkf-list-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  text-decoration: none;
  color: #444;
  font-size: 13px;
  transition: color 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.tkf-list-link:hover {
  color: #2979ff;
}

.tkf-list-link:active {
  opacity: 0.6;
}

.tkf-list-name {
  flex: 1;
}

.tkf-list-count {
  color: #999;
  font-size: 12px;
  flex-shrink: 0;
}

.tkf-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-radius: 4px;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s;
}

.tkf-checkbox.tkf-checked {
  background: #2979ff;
  border-color: #2979ff;
}

.tkf-checkbox.tkf-checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.tkf-active .tkf-list-link {
  color: #2979ff;
  font-weight: 600;
}

.tkf-show-more {
  display: block;
  width: 100%;
  padding: 8px;
  border: none;
  background: none;
  color: #2979ff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  margin-top: 4px;
  transition: opacity 0.2s;
}

.tkf-show-more:hover {
  opacity: 0.7;
}

.tkf-price-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.tkf-price-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tkf-price-label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
}

.tkf-price-input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 700;
  color: #111;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
  box-sizing: border-box;
}

.tkf-price-input::placeholder {
  color: #aaa;
  font-weight: 400;
}

.tkf-price-input::-webkit-outer-spin-button,
.tkf-price-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.tkf-price-input:focus {
  border-color: #2979ff;
  box-shadow: 0 0 0 2px rgba(41, 121, 255, 0.15);
}

.tkf-price-unit {
  font-size: 11px;
  color: #999;
  text-align: center;
}

.tkf-price-apply {
  width: 100%;
  padding: 9px 16px;
  background: #2979ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, opacity 0.15s;
  font-family: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.tkf-price-apply:hover {
  background: #1565c0;
}

.tkf-price-apply:active {
  transform: scale(0.96);
}

.tkf-price-apply-loading {
  opacity: 0.7;
  pointer-events: none;
}

.takfaz-active-filters {
  direction: rtl;
  font-family: inherit;
}

.tkf-active-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
}

.tkf-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #e3f2fd;
  color: #1565c0;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s;
  word-break: break-word;
}

.tkf-tag:hover {
  background: #bbdefb;
}

.tkf-tag-label {
  line-height: 1.5;
  flex: 1;
  min-width: 0;
}

.tkf-tag-close {
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #1565c0;
  transition: color 0.15s;
  font-weight: 700;
  flex-shrink: 0;
}

.tkf-tag-close:hover {
  color: #c62828;
}

.tkf-tag-clear-all {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: none;
  border: 1px dashed #ef5350;
  color: #ef5350;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  margin-top: 2px;
  box-sizing: border-box;
}

.tkf-tag-clear-all:hover {
  background: #ef5350;
  color: #fff;
  border-color: #ef5350;
}

.tkf-products-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 120px;
  z-index: 99;
  border-radius: 8px;
  backdrop-filter: blur(2px);
}

.tkf-mobile-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 20px;
  background: #2979ff;
  color: #2b2b2b;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  box-sizing: border-box;
}

.tkf-filter-icon {
  display: inline-block !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  vertical-align: middle;
  margin-left: 6px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M5.78584 3C4.24726 3 3 4.24726 3 5.78584C3 6.59295 3.28872 7.37343 3.81398 7.98623L6.64813 11.2927C7.73559 12.5614 8.33333 14.1773 8.33333 15.8483V18C8.33333 19.6569 9.67648 21 11.3333 21H12.6667C14.3235 21 15.6667 19.6569 15.6667 18V15.8483C15.6667 14.1773 16.2644 12.5614 17.3519 11.2927L20.186 7.98624C20.7113 7.37343 21 6.59294 21 5.78584C21 4.24726 19.7527 3 18.2142 3H5.78584Z' fill='%23222'/%3E%3C/svg%3E") !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

.tkf-mobile-filter-btn:hover {
  background: #1565c0;
}

.tkf-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.tkf-sidebar-overlay.tkf-sidebar-overlay-show {
  opacity: 1;
  visibility: visible;
}

.tkf-sidebar {
  position: fixed;
  top: 0;
  right: -85%;
  width: 80%;
  max-width: 360px;
  height: 100%;
  background: #f9f9f9;
  z-index: 9999;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  direction: rtl;
}

.tkf-sidebar.tkf-sidebar-open {
  right: 0;
}

.tkf-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: #fff;
  border-bottom: 1px solid #eaeaea;
  flex-shrink: 0;
}

.tkf-sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: #222;
}

.tkf-sidebar-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
}

.tkf-sidebar-close:hover {
  color: #c62828;
}

.tkf-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.tkf-sidebar.tkf-sidebar-open {
  touch-action: pan-y;
}
