.categories-wrapper {
  margin: 15px;
  gap: 1rem;
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: visible;
  position: relative;
  white-space: nowrap;
  scrollbar-width: none;
  padding: 0;
}

.categories-wrapper::-webkit-scrollbar {
  display: none;
}

.categories-wrapper .categories-list {
  margin-top: 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  overflow: visible;
}

.categories-icon {
  cursor: pointer;
  padding: 0;
  position: sticky;
  left: 0;
  background-color: var(--bg);
  z-index: 30;
  display: flex;
  align-items: center;
}

.categories-icon button{
  background-color: var(--bg);
  border: none;
  cursor: pointer;
  margin-bottom: -5px;
}

.categories-wrapper .categories-list .scroll-arrow {
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  box-sizing: border-box;
  background-color: var(--bg);
  transition: background-color 0.2s ease;
  z-index: 40;
  position: sticky;
  top: 0;
}

.categories-wrapper .categories-list .scroll-arrow:hover {
  border-color: var(--border);
}

.categories-wrapper .categories-list .scroll-arrow-left {
  left: 33px;
  background: var(--bg);
}

.categories-wrapper .categories-list .scroll-arrow-right {
  right: -2px;
  background: var(--bg);
}

.categories-wrapper .categories-list .lists-container {
  padding-right: 40px;
  overflow: visible;
}

.categories-wrapper .categories-list .lists-container{
  margin-left: 5px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
}

.categories-wrapper .categories-list .group {
  display: flex;
  flex-direction: row;
  align-items: center;
  position: relative;
}

.categories-wrapper .categories-list .category-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
  padding: 3px 13px;
  font-size: .9rem;
  text-decoration: none;
  background-color: var(--secondary);
  color: white;
  transition: background-color 0.3s ease, border-radius 0.3s ease, color 0.3s ease;
  border: 1px solid transparent;
  border-radius: 20px;
}

.categories-wrapper .categories-list .group .category-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
  padding: 3px 13px;
  font-size: .9rem;
  text-decoration: none;
  background-color: var(--secondary);
  color: white;
  transition: background-color 0.3s ease, border-radius 0.3s ease, color 0.3s ease;
  border: 1px solid transparent;
  border-radius: 20px;
}

.categories-wrapper .categories-list .group a.category-link:hover{
  background-color: var(--lighter-secondary);
  border-radius: 20px;
  color: var(--secondary);
}

.categories-wrapper .categories-list .group:hover .category-link {
  border: var(--border) 1px solid;
  background-color: var(--secondary);
  border-radius: 20px;
  color: white;
}

.categories-wrapper .categories-list .group .sub-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 200px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 7px;
  flex-direction: column;
}

.categories-wrapper .categories-list .group:hover .sub-dropdown {
  display: flex;
}

.categories-wrapper .categories-list .group .sub-dropdown > a {
  padding: 8px 12px;
  font-size: 1rem;
  text-decoration: none;
  color: var(--text);
  transition: background-color 0.2s ease;
  white-space: nowrap;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.categories-wrapper .categories-list .group .sub-dropdown > a:hover {
  background-color: rgba(96, 136, 136, 0.1);
}

.type-dropdown {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 180px;
  margin-left: 0;
  flex-direction: column;
  z-index: 1001;
  max-height: 400px;
  overflow-y: auto;
}

.type-dropdown.open-left {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: 0;
}

.type-dropdown a {
  padding: 8px 12px;
  font-size: 1rem;
  text-decoration: none;
  color: var(--text);
  transition: background-color 0.2s ease;
  white-space: nowrap;
  display: block;
}

.type-dropdown a:hover {
  background-color: rgba(96, 136, 136, 0.1);
}

.sub-dropdown > a:hover + .type-dropdown,
.type-dropdown:hover {
  display: flex;
}

/* ---------------------------------- Category Details ---------------------------------- */
.headline {
  font-size: 1rem;
  text-align: center;
  margin: 0 auto;
  color: var(--secondary);
}