/**
 * Custom Filter Styles for Camper Jack Service Theme
 * Dedicated styles for product filters
 */

/* Filter Section Containers */
.custom-filter-sidebar {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.filter-section {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.filter-section:last-child {
  border-bottom: none;
}

/* Filter Title Styling */
.filter-title.cj-footer-title {
  color: #000 !important; /* Force black color */
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-family: 'Roboto', sans-serif;
}

.filter-title.cj-footer-title:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 40px;
  height: 3px;
  background-color: var(--wc-primary, #3e7cb4);
  transition: width 0.3s ease;
}

.filter-section:hover .filter-title.cj-footer-title:after {
  width: 60px;
}

.filter-content {
  margin-top: 1.5rem;
  font-family: 'Roboto', sans-serif;
  font-size: 0.95rem;
}

/* Category List Styling */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item {
  margin-bottom: 0.75rem;
}

.category-item a {
  color: #333;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
  font-weight: 400;
}

.category-item a:hover {
  color: var(--wc-primary);
}

.category-item .count {
  font-size: 0.85rem;
  color: #666;
  background-color: #f5f5f5;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.category-item:hover .count {
  background-color: var(--wc-primary);
  color: white;
}

/* Price Range Slider - Fixed with exactly two handles */
.price-slider-container {
  padding: 0.75rem 0;
}

/* Base slider track */
.price-slider {
  height: 4px;
  background-color: #eee;
  margin: 1.5rem 0;
  position: relative;
  border-radius: 4px;
  /* Clear any potential extra elements */
  overflow: visible !important;
}

/* The selected range */
.price-slider .ui-slider-range {
  background-color: var(--wc-primary);
  height: 4px;
  position: absolute;
  top: 0;
  border-radius: 4px;
}

/* All handle styling */
.price-slider .ui-slider-handle {
  background: var(--wc-primary);
  border: 2px solid white;
  width: 18px;
  height: 18px;
  position: absolute;
  top: -7px;
  cursor: ew-resize;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  margin-left: -9px; /* Center the handle */
  z-index: 2;
  outline: none;
  touch-action: none;
}

/* Specifically target just the first two handles */
.price-slider .ui-slider-handle:nth-child(1),
.price-slider .ui-slider-handle:nth-child(2) {
  display: block !important;
}

/* Handle intersection highlighting */
.price-slider .ui-slider-handle:nth-child(1).intersecting,
.price-slider .ui-slider-handle:nth-child(2).intersecting {
  transform: scale(1.1);
  background-color: #ff6b35;
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2);
}

/* Hide ANY extra handles beyond the first two */
.price-slider .ui-slider-handle:nth-child(n+3) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Handle hover state */
.price-slider .ui-slider-handle:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  background-color: var(--wc-accent, #2c5c8f);
}

/* Handle active state */
.price-slider .ui-slider-handle:active {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Price display values */
.price-slider-values {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
}

/* Filter button - Modern Design */
.filter-button {
  background-color: var(--wc-primary);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500; /* Adjusted weight */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1.25rem;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.filter-button:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: all 0.6s ease;
}

.filter-button:hover {
  background-color: var(--wc-accent, #2c5c8f);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.filter-button:hover:before {
  left: 100%;
}

.filter-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Attribute Filter Styling */
.attribute-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.attribute-item {
  margin-bottom: 0.75rem;
}

.attribute-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: #333;
  font-weight: 400;
}

.attribute-checkbox {
  margin-right: 8px;
  position: relative;
  top: -1px;
}

.attribute-label .count {
  margin-left: 5px;
  font-size: 0.85rem;
  color: #666;
  background-color: #f5f5f5;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  transition: all 0.2s ease;
}

/* Responsive Styling */
@media (max-width: 1023px) {
  .filter-title.cj-footer-title {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .filter-title.cj-footer-title:after {
    bottom: -8px;
    width: 30px;
  }

  .filter-content {
    margin-top: 1.25rem;
  }
}

@media (max-width: 768px) {
  .custom-filter-sidebar {
    margin-bottom: 1.5rem;
  }

  .filter-section {
    padding: 1rem;
  }

  .filter-title.cj-footer-title {
    margin-bottom: 0;
    padding: 0.5rem 0;
    position: relative;
    cursor: pointer;
  }

  .filter-title.cj-footer-title:after {
    bottom: -4px;
  }

  .filter-title.cj-footer-title:before {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    transition: transform 0.2s ease;
  }

  .filter-title.cj-footer-title.expanded:before {
    transform: translateY(-50%) rotate(45deg);
  }
  
  .filter-content.expanded {
    display: block;
  }
} 