/* RESET ALL PREVIOUS FILTER STYLES */
.product-filters-widget-wrapper,
.product-filters-sidebar,
.product-filters-accordion,
.filter-group,
.filter-group-header,
.filter-group-toggle,
.toggle-icon,
.filter-group-content,
.filter-checkbox-label.as-button,
.filter-checkbox-label input[type="checkbox"],
.filter-checkbox-label span,
.filters-actions,
.filters-apply-btn,
.clear-filters-btn {
  all: unset;
  box-sizing: border-box;
}

/* MAIN WRAPPER */
.product-filters-widget-wrapper {
  direction: rtl;
  background: #fff;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: inherit;
}

.grid-sidebar {
  
  padding-top: 70px !important;
  
}
.woocommerce-ordering{
  position: relative;
}
.woocommerce-ordering select{
  
  border-color: #dfdfdf;
  padding: 15px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

}

.woocommerce-ordering::after {
  content: "";
  display: block;
  background: url('../assets/images/caret.svg') no-repeat;
  position: absolute;
    left: 16px;
    top: 61%;
    transform: translateY(-61%);
    pointer-events: none;
    z-index: 10;
    width: 25px;
    height: 25px;
}

/* HEADING */
.filters-heading-desktop, .filters-heading-sidebar {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  color: #111;
  margin: 0;
  padding: 24px 0 0 0;
  background: none;
  border: none;
  letter-spacing: 0.5px;
  position: relative;
}
.filters-heading-desktop:after, .filters-heading-sidebar:after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  margin: 8px auto 0 auto;
  background: linear-gradient(90deg, #007cba 60%, #2ecc40 100%);
  border-radius: 2px;
}

/* ACCORDION */
.product-filters-accordion {
  margin: 0;
  padding: 0;
  border: none;
}

.filter-group {
  display: block;
  border-bottom: 1px solid #E1E1E1;
  margin: 0;
  background: none;
}

.filter-group-header {
  display: flex;
  align-items: center;
  height: 48px;
  cursor: pointer;
  background: none;
  padding: 0 0 0 0;
}

button.filter-group-toggle,
[type="button"].filter-group-toggle {
  background: none;
  border: none;
  width: 100%;
  text-align: right;
  font-size: 20px;
  font-weight: bold;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  outline: none;
  cursor: pointer;
  padding: 0 24px 0 0;
  margin: 0;
  transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

button.filter-group-toggle:hover,
button.filter-group-toggle:focus{
  background: transparent;
  color: #000000;
  transform: none;
  box-shadow: none;
}

.toggle-icon {
  font-size: 32px;
  margin-left: 16px;
  font-weight: bold;
  width: 24px;
  display: inline-block;
  text-align: center;
  color: #111;
  line-height: 1;
  /* transition: transform 0.3s ease-in-out; */
}

/* FILTER GROUP CONTENT */
.filter-group-content {
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  gap: 0;
  padding: 0 24px 0 0;
  background: #fff;
  transition: max-height 0.3s cubic-bezier(0.4,0,0.2,1), padding 0.3s;
}
.filter-group-content.open {
  max-height: 500px; /* Adjust based on your content */
  padding: 0 24px 12px 0;
}

/* CHECKBOXES */
.filter-checkbox-label.as-button {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  margin-bottom: 0;
  gap: 0;
  padding: 0;
  background: none;
  border: none;
  height: 32px;
  transition: background-color 0.2s ease-in-out;
}

.filter-checkbox-label.as-button:hover {
  background-color: #f8f9fa;
}
.filter-checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-left: 8px;
  margin-right: 0;
  border: 1.5px solid #E1E1E1;
  border-radius: 3px;
  background: #fff;
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  vertical-align: middle;
  cursor: pointer;
  transition: border-color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}
.filter-checkbox-label input[type="checkbox"]:checked {
  background: #fff;
  border: 2px solid #E1E1E1;
}
.filter-checkbox-label input[type="checkbox"]:checked:after {
  content: '\2714';
  color: #000000;
  font-size: 16px;
  position: absolute;
  right: 2px;
  top: 0px;
  font-weight: bold;
  animation: checkmark-appear 0.2s ease-in-out;
}

@keyframes checkmark-appear {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
.filter-checkbox-label span {
  flex: 1;
  text-align: right;
  color: #222;
  font-weight: 400;
  padding: 0;
  background: none;
  line-height: 32px;
}

/* BUTTONS (if shown) */
.filters-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 24px 0 0 0;
  margin: 0;
  border: none;
}
.filters-apply-btn, .clear-filters-btn {
  width: 100%;
  background: #fff;
  color: #000000;
  border: 2px solid #000000;
  border-radius: 0;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  padding: 14px 0;
  margin: 0;
  box-shadow: none;
  outline: none;
  text-align: center;
  transition: none;
  display: block;
}

.active-product-filters-row{
  display: flex;
  align-items: center;
  gap: 15px;
}
.active-filter-btn{
  color: #000000 !important;
  border: 1px solid #000000;
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
}

/* Remove Elementor default button styles */
 button.filters-apply-btn,
 button.clear-filters-btn,
 button.filters-apply-btn:active,
button.clear-filters-btn:active,
button.filters-apply-btn:focus,
button.clear-filters-btn:focus {
  background: #fff !important;
  color: #111 !important;
  border: 2px solid #000000;
  border-radius: 0 !important;
  box-shadow: none !important;
}


button.filters-apply-btn:hover,
button.clear-filters-btn:hover{
  background-color: #282828 !important;
  color: #ffffff !important;
}

/* MOBILE DRAWER STYLES */
.product-filters-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  background: #fff; /* White background */
  z-index: 9999;
  display: none;
  transition: transform 0.3s ease-in-out;
  transform: translateX(100%); /* Start off-screen to the right */
  padding: 100px 15px 0;
}

.product-filters-drawer.active {
  transform: translateX(0); /* Slide in from right */
}

.product-filters-drawer .product-filters-sidebar {
  position: absolute;
  top: 0;
  right: 0; /* Position on the right side */
  width: 320px;
  height: 100%;
  background: #fff;
  overflow-y: auto;
  margin: 0;
  border-radius: 0;
  direction: rtl;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

button.drawer-close-btn {
  position: absolute;
  top: 50px;
  left: 20px; /* Position in top left corner */
  background: transparent;
  color: #000000;
  border: none;
  width: 25px;
  height: 25px;
  border-radius: 100%;
  cursor: pointer;
  font-size: 24px;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  
}

.drawer-close-btn:hover {
  background: #c82333;
}

/* DESKTOP STYLES - Show sidebar normally */
@media (min-width: 769px) {
  .product-filters-drawer {
    display: none !important; /* Hide drawer on desktop */
  }
  
  .product-filters-sidebar {
    display: block !important; /* Show sidebar on desktop */
  }
  
  .product-filters-widget-wrapper {
    display: block !important; /* Show wrapper on desktop */
  }
}

/* MOBILE/TABLET STYLES - Hide sidebar, show drawer */
@media (max-width: 768px) {
  .product-filters-sidebar {
    display: none !important; /* Hide the sidebar on mobile */
  }
  
  /* Don't hide the wrapper on mobile - it contains the drawer */
  /* .product-filters-widget-wrapper {
    display: none !important;
  } */
  
  /* Show the drawer when active */
  .product-filters-drawer.active {
    display: block;
  }
}

@media (max-width: 767px) {
  .product-filters-drawer .product-filters-sidebar {
    width: 100%; /* Full width on very small screens */
  }
  
  .product-filters-widget-wrapper {
    width: 100%;
    min-width: 0;
    border-radius: 0;
  }
  
  .filter-group-header {
    padding: 0 10px;
  }
  
} 