/**
 * Product Filters Styling - Optimized Version
 */
.elementor-widget-wowe-product-filters .elementor-widget-container {
  padding: 20px;
  border: 1px solid #f2f0f4;
  border-radius: 6px;
}

.wowe-product-filters .wowe-filters-main-title {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 600;
  position: relative;
  padding-bottom: 12px;
  color: #2c3e50;
}

.wowe-product-filters .wowe-filters-main-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: #ff4747;
}

.wowe-product-filters .wowe-filters-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wowe-product-filters .wowe-filter-group {
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.wowe-product-filters .wowe-filter-group:last-child {
  border-bottom: none;
}

.wowe-product-filters .wowe-filter-title {
  margin: 0 0 20px;
  font-size: 16px;
  font-weight: 500;
}

.wowe-categories-filter .wowe-filter-title {
  margin: 0;
}

.wowe-product-filters .wowe-filter-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 285px;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 20px 15px 0 1px;
}

.wowe-product-filters .wowe-filter-items::-webkit-scrollbar {
  width: 4px;
}

.wowe-product-filters .wowe-filter-items::-webkit-scrollbar-thumb {
  background: #ff4747;
  border-radius: 10px;
}

.wowe-product-filters .wowe-filter-items::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 10px;
}

.wowe-product-filters .wowe-filter-checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: calc(var(--wowe-checkbox-size, 20px) + 8px);
  margin-bottom: 8px;
  cursor: pointer;
  user-select: none;
}

.wowe-product-filters .wowe-filter-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.wowe-product-filters .wowe-filter-checkbox:checked ~ .wowe-filter-checkbox-label::before {
  background-color: #ff4747;
  border-color: #ff4747;
}

.wowe-product-filters .wowe-filter-checkbox:checked ~ .wowe-filter-checkbox-label::after {
  opacity: 1;
  transform: translate(-50%, -65%) rotate(45deg) scale(1);
}

.wowe-product-filters .wowe-filter-checkbox:focus ~ .wowe-filter-checkbox-label::before {
  box-shadow: 0 0 0 2px rgba(255, 71, 71, 0.2);
}

.wowe-product-filters .wowe-filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 14px;
  color: #555;
  transition: color 0.2s ease;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
}

.wowe-product-filters .wowe-filter-checkbox-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: var(--wowe-checkbox-size, 20px);
  height: var(--wowe-checkbox-size, 20px);
  border: 1px solid #a7a7a7;
  border-radius: 50%;
  background-color: #fff;
  transition: all 0.2s ease;
}

.wowe-product-filters .wowe-filter-checkbox-label::after {
  content: "";
  position: absolute;
  left: calc(var(--wowe-checkbox-size, 20px) * 0.5);
  top: 50%;
  width: calc(var(--wowe-checkbox-size, 20px) * 0.3);
  height: calc(var(--wowe-checkbox-size, 20px) * 0.45);
  border: solid white;
  border-width: 0 2px 2px 0;
  opacity: 0;
  transform: translate(-50%, -65%) rotate(45deg) scale(0);
  transition: all 0.2s ease;
}

.wowe-product-filters .wowe-filter-checkbox-label .wowe-filter-count {
  color: #888;
  font-size: 12px;
  background: #f5f5f5;
  padding: 4px 6px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.wowe-product-filters .wowe-filter-checkbox-label:hover {
  color: #ff4747;
}

.wowe-product-filters .wowe-filter-checkbox-label:hover::before {
  border-color: #ff4747;
}

.wowe-product-filters .wowe-filter-checkbox-label:hover .wowe-filter-count {
  background: #fff1f1;
  color: #ff4747;
}

/* Essential slider styling */
.wowe-price-slider-range.ui-slider,
.ui-slider.wowe-price-slider-range {
  height: 4px !important;
  background: #e0e0e0 !important;
  border: none !important;
  border-radius: 4px !important;
  position: relative !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1) !important;
  margin: 10px 8px 0 2px !important;
}

.wowe-price-slider-range .ui-slider-range,
.ui-slider.wowe-price-slider-range .ui-slider-range {
  background: #ff4747 !important;
  height: 100% !important;
  border-radius: 4px !important;
  position: absolute !important;
  z-index: 1 !important;
}

.wowe-price-slider-range .ui-slider-handle,
.ui-slider.wowe-price-slider-range .ui-slider-handle {
  width: 10px !important;
  height: 10px !important;
  background: #fff !important;
  border: 2px solid #ff4747 !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  position: absolute !important;
  margin-left: -4px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  transition: all 0.2s ease !important;
  z-index: 11 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.wowe-price-slider-range .ui-slider-handle:hover,
.ui-slider.wowe-price-slider-range .ui-slider-handle:hover,
.wowe-price-slider-range .ui-slider-handle.ui-state-active,
.ui-slider.wowe-price-slider-range .ui-slider-handle.ui-state-active {
  transform: translateY(-50%) scale(1.1) !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3) !important;
}

.wowe-price-slider-range .ui-slider-handle:focus,
.ui-slider.wowe-price-slider-range .ui-slider-handle:focus {
  outline: none !important;
  --wowe-slider-handle-focus-color: rgba(255, 71, 71, 0.2);
  box-shadow: 0 0 0 3px var(--wowe-slider-handle-focus-color) !important;
}

/* Price Range Input Fields */
.wowe-product-filters .wowe-price-inputs {
  display: flex !important;
  gap: 15px !important;
  margin: 20px 0 0 !important;
}

.wowe-product-filters .wowe-price-input-group {
  flex: 1 !important;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wowe-product-filters .wowe-price-input-group label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.wowe-product-filters .wowe-price-input-group .wowe-price-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #f0f1f1;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  transition: all 0.2s ease;
}

.wowe-product-filters .wowe-price-input-group .wowe-price-input:focus {
  --wowe-price-input-box-shadow-color: rgba(255, 71, 71, 0.1);
  outline: none;
  border-color: #ff4747;
  box-shadow: 0 0 0 3px var(--wowe-price-input-box-shadow-color);
  background: #fff;
}

.wowe-product-filters .wowe-price-input-group .wowe-price-input::-webkit-inner-spin-button,
.wowe-product-filters .wowe-price-input-group .wowe-price-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.wowe-product-filters .wowe-price-input-group .wowe-price-input[type=number] {
  -moz-appearance: textfield;
}

/* Filter Reset Button */
.wowe-product-filters .wowe-filter-reset-button {
  width: 100%;
  padding: 10px 20px;
  background: #fff;
  border: 2px solid #ff4747;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #ff4747;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.wowe-product-filters .wowe-filter-reset-button .wowe-reset-icon {
  transition: transform 0.3s ease;
}

.wowe-product-filters .wowe-filter-reset-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: #ff4747;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
  z-index: -1;
}

.wowe-product-filters .wowe-filter-reset-button:hover {
  color: #fff;
  transform: translateY(-1px);
}

.wowe-product-filters .wowe-filter-reset-button:hover::before {
  width: 104%;
  height: 300px;
}

.wowe-product-filters .wowe-filter-reset-button:hover .wowe-reset-icon {
  transform: rotate(180deg);
}

.wowe-product-filters .wowe-filter-reset-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 71, 71, 0.2);
}

.wowe-product-filters .wowe-filter-reset-button svg {
  width: 1em;
  height: 1em;
}

.wowe-product-filters .wowe-filter-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.wowe-product-filters .wowe-filter-buttons .wowe-filter-button {
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Loading State */
.elementor-widget.wowe-loading {
  position: relative;
  min-height: 100px;
}

.elementor-widget.wowe-loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.6);
  z-index: 999;
}

.elementor-widget.wowe-loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #555;
  border-radius: 50%;
  animation: wowe-spin 1s linear infinite;
  z-index: 1000;
}

/* No Results Message */
.wowe-no-results {
  text-align: center;
  padding: 20px;
  background-color: #f5f5f5;
  border-radius: 4px;
  margin-top: 20px;
  color: #555;
  font-size: 14px;
}

@keyframes wowe-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* Responsive Styles */
@media (max-width: 768px) {
  .wowe-product-filters .wowe-filter-buttons {
    flex-direction: column;
  }

  .wowe-product-filters .wowe-price-filter .wowe-price-values {
    padding: 4px 10px;
    font-size: 13px;
  }

  .wowe-product-filters .wowe-price-filter .wowe-price-slider {
    margin: 0 5px 15px;
  }
}
@media (max-width: 480px) {
  .wowe-product-filters .wowe-price-filter .wowe-price-inputs {
    flex-direction: column;
    gap: 10px;
  }
}