/*Sidebar*/
.row .side-page .widget .widgettitle,
.row .side-page .widget h4 {
  color: var(--wb-primary-color);
  font-weight: 500;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 24px;
}
.row .side-page .widget ul.attribute-filter-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
    max-height: 180px;
    margin: 0;
    padding: 4px;
    overflow: auto;
}
.row .side-page .widget ul.attribute-filter-list li {
  display: flex;
  gap: 8px;
  align-items: center;
  align-content: center;
  flex-direction: row;
  font-size: 12px;
}
.widget h3 {
  margin-bottom: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.woocommerce-price-filter-widget {
  padding: 10px;
  background: #f8f8f8;
  border-radius: 8px;
  text-align: center;
}

#price-slider {
  width: 100%;
  margin: 15px 0;
  height: 8px;
  position: relative;
  background: #ddd;
  border-radius: 5px;
}

.ui-slider .ui-slider-handle {
  width: 18px;
  height: 18px;
  background: #0073aa;
  border-radius: 50%;
  position: absolute;
  top: -5px;
  cursor: pointer;
}

.price-inputs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.price-inputs input {
  width: 80px;
  padding: 5px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 5px;
}

/* Sort */
.toggle-sort {
    border: 0;
    border-radius: 100px;
}

/*Description*/
article.term-description {
    background-color: #fff;
    border-radius: 8px;
    padding: 16px 16px 64px 16px;
    margin-bottom: 48px;
}
/* Close sidebar button */
#closeSidebar {
    display: none;
    background: red;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    position: absolute;
    top: 10px;
    left: 10px;
}
/* --- حالت دسکتاپ (اسلایدر افقی) --- */
@media (min-width: 1025px) {
  .row .side-page {
    position: sticky;
    top: 16px;
    width: 20%;
    display: flex;
    gap: 16px;
    flex-direction: column;
    background-color: #ffffff !important;
    margin: 0px 0px 10px 0px;
    padding: 16px 16px 16px 16px;
    border-radius: 8px 8px 8px 8px;
    box-shadow: 0px 5px 20px 0px rgba(0, 0, 0, 0.05);
    height: fit-content;
    z-index: 111;
  }
  button#toggleSidebar {
    display: none;
  }
}

/* --- حالت موبایل و تبلت (دکمه برای باز کردن) --- */
@media (max-width: 768px) {
  .side-page {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 10px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease-in-out;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
    z-index: 111111111111111 !important;
  }

  .side-page.active {
    right: 0;
    overflow-y: auto;
    height: 100vh;
  }
  button#closeSidebar {
    display: block;
  }
  /* دکمه باز کردن سایدبار */
  #toggleSidebar {
    display: block;
    position: relative;
    background: #500c59;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
  }
  h1.woocommerce-products-header__title.page-title {
    font-size: 24px;
    margin-top: 40px 0 0 0;
    text-align: center;
  }
  .sidebar-button-container {
    width: 100%;
    padding: 15px;
  }
  button#toggleSidebar {
    width: 100%;
  }
  /*Shop header container*/
  .shop-header {
    position: relative;
    margin-bottom: 0px;
    display: flex;
    flex-direction: column-reverse;
    width: 100%;
    justify-content: space-between;
    background: #ffffff;
    box-shadow: 0px 5px 20px 0px rgba(0, 0, 0, 0.05);
    padding: 14px;
    border-radius: 16px;
    align-items: stretch;
  }
  /*Breadcrumb*/
  .wb-custom-breadcrumb a:first-child::before {
      display: none;
  }
  /*Sort*/
  .toggle-sort {
      display: none;
  }
  .shop-header form.woocommerce-ordering {
        position: static;
        opacity: 1;
        width: 100%;
        height: auto;
        box-shadow: none;
    }
  ul.catelog-list {
    flex-direction: row;
    gap: 8px;
    list-style: none;
    text-wrap: nowrap;
    margin: 0;
    padding: 14px 4px;
    overflow: auto;
  }
}