.subcat-hor-container {
  width: 100%;
  margin: 20px 0;
  position: relative;
}

.subcat-hor-wrapper {
  display: flex;
  gap: 1rem;
  padding-top: 16px;
  padding-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

/* Ocultar scrollbar en Chrome, Safari y Opera */
.subcat-hor-wrapper::-webkit-scrollbar {
  height: 4px;
}

.subcat-hor-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.subcat-hor-wrapper::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.subcat-hor-wrapper::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.subcat-hor-item {
  flex: 0 0 auto;
  padding: 8px 16px;
  background-color: #f5f5f5;
  border-radius: 20px;
  text-align: center;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s ease;
  border: 1px solid #e0e0e0;
}

.subcat-hor-item:hover {
  background-color: #e0e0e0;
}

.subcat-hor-active {
  background-color: #333;
  color: #fff;
  border-color: #333;
}

/* Indicador para categorías que tienen subcategorías */
.subcat-hor-has-children::after {
  content: "›";
  display: inline-block;
  margin-left: 5px;
  font-size: 16px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.subcat-hor-active.subcat-hor-has-children::after {
  color: #fff;
}

@media (min-width: 768px) {
  .subcat-hor-wrapper {
    padding-bottom: 0;
    gap: 1.5rem;
  }

  .subcat-hor-item {
    font-size: 16px;
    padding: 10px 20px;
  }

  .subcat-hor-has-children::after {
    font-size: 18px;
  }
}
