/* APFN Catalogue — hierarchical category navigation 0.8.0 */

.apfn-category-sidebar__inner {
  position: sticky;
  top: 24px;
}

.apfn-category-sidebar .apfn-filters {
  position: static;
  top: auto;
}

.apfn-category-navigation {
  margin: 0 0 20px;
  padding: 24px;
  border: 1px solid var(--apfn-border, #e3e9f1);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(42, 55, 78, .05);
}

.apfn-category-navigation h2 {
  margin: 0 0 16px;
  color: var(--apfn-ink, #333c4c);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
}

.apfn-category-navigation ul,
.apfn-category-navigation-mobile ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.apfn-category-navigation li {
  margin: 0;
  border-bottom: 1px solid #edf1f5;
}

.apfn-category-navigation li:last-child {
  border-bottom: 0;
}

.apfn-category-navigation a {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  color: var(--apfn-text, #494c50);
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.35;
}

.apfn-category-navigation a:hover,
.apfn-category-navigation a:focus {
  color: var(--apfn-primary, #6a9ae3);
}

.apfn-category-navigation__arrow {
  flex: 0 0 auto;
  color: var(--apfn-primary, #6a9ae3);
  font-size: 1.1rem;
  transition: transform .2s ease;
}

.apfn-category-navigation a:hover .apfn-category-navigation__arrow,
.apfn-category-navigation a:focus .apfn-category-navigation__arrow {
  transform: translateX(3px);
}

.apfn-category-navigation + .apfn-filters #search_filters {
  margin-top: 0;
}

.apfn-category-navigation-mobile {
  margin: 0 0 22px;
  border: 1px solid var(--apfn-border, #e3e9f1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(42, 55, 78, .05);
}

.apfn-category-navigation-mobile summary {
  position: relative;
  padding: 17px 48px 17px 18px;
  color: var(--apfn-ink, #333c4c);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.apfn-category-navigation-mobile summary::-webkit-details-marker {
  display: none;
}

.apfn-category-navigation-mobile summary::after {
  position: absolute;
  top: 50%;
  right: 18px;
  content: "+";
  color: var(--apfn-primary, #6a9ae3);
  font-size: 1.35rem;
  font-weight: 400;
  transform: translateY(-50%);
}

.apfn-category-navigation-mobile[open] summary::after {
  content: "−";
}

.apfn-category-navigation-mobile ul {
  padding: 0 18px 14px;
}

.apfn-category-navigation-mobile li {
  border-top: 1px solid #edf1f5;
}

.apfn-category-navigation-mobile a {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  color: var(--apfn-text, #494c50);
  font-weight: 600;
}

@media (max-width: 767px) {
  .apfn-category-navigation-mobile {
    display: block !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .apfn-category-navigation__arrow {
    transition: none;
  }
}
