/* Styles de base */
.archive .ast-desktop .ast-primary-header-bar.main-header-bar {
  padding-top: 1.5rem;
}

.category-sidebar {
  padding: 30px;
  background: #fff;
  border-radius: 0;
  box-shadow: none;
  width: 100%;
}

.category-sidebar h2 {
  font-size: 20px;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 35px;
  font-weight: 500;
  letter-spacing: 1px;
  position: relative;
  margin-top: 120px;
}

.category-sidebar h2:after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--angy-pink);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-right: 10px;
}

.toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  padding: 0;
  margin-left: 15px;
}

.toggle-icon {
  position: relative;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #666;
  border-bottom: 1.5px solid #666;
  transform: rotate(45deg);
  transition: all 0.3s ease;
  margin-top: -4px;
}

.category-item.open > .category-header .toggle-icon {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.category-item:hover > .category-header .toggle-icon {
  border-color: var(--angy-pink);
}

.subcategories-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.category-item.open > .subcategories-wrapper {
  max-height: 1000px;
}

.product-categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.subcategory-list {
  margin-left: 20px;
  margin-top: 10px;
  border-left: none;
}

.product-categories-list li {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.subcategory-list li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: none !important;
}

.product-categories-list a {
  color: #666;
  text-decoration: none;
  font-size: 15px;
  transition: all 0.3s ease;
  font-weight: 500;
  display: block;
  padding: 8px 0;
  flex: 1;
}

.subcategory-list a {
  font-size: 14px;
  font-weight: normal;
  padding-left: 15px;
  position: relative;
}

.subcategory-list a:before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 1px;
  background-color: #ccc;
}

.product-categories-list a:hover {
  color: var(--angy-pink);
}

/* Styles spécifiques pour les sous-sous-catégories */
.subcategory-list .subcategory-list {
  margin-left: 15px;
  margin-top: 5px;
}

.subcategory-list .subcategory-list li {
  margin-bottom: 5px;
  padding-bottom: 0;
  border-bottom: none;
}

.subcategory-list .subcategory-list a {
  font-size: 13px;
  padding: 3px 0;
}

.subcategory-list .subcategory-list a:before {
  display: none;
}

/* Media Queries */
@media screen and (min-width: 850px) {
  .category-sidebar-wrapper {
    flex-basis: 30%;
    max-width: 30%;
    margin: 0;
    padding-right: 30px;
  }

  .ast-woocommerce-container {
    padding-left: 8px;
    float: right;
  }

  .custom-category-banner {
    display: flex;
    gap: 30px;
    padding-right: 4rem;
  }
}

@media (max-width: 2400px) {
  .woocommerce-page ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.1rem !important;
  }
}

@media (max-width: 768px) {
  .custom-category-banner {
    display: none;
  }
}

@media screen and (min-width: 550px) and (max-width: 849px) {
  .category-sidebar-wrapper {
    max-width: 100%;
    padding: 0 15px;
    margin-bottom: 30px;
  }

  .category-sidebar {
    padding: 20px;
  }

  .ast-woocommerce-container {
    width: 100%;
    padding: 0 15px;
  }
}

@media screen and (max-width: 549px) {
  .ast-woocommerce-container {
    width: 100%;
    padding: 0 15px;
  }
}
