:root {
  --tab-main: #823733;
  --tab-gray: #f0f0f0;
  --tab-height: 200px;
}

/* Tab Container */
.category-tabs-container {
  width: 100%;
  position: relative;
}

/* Tab Navigation */
.red-tab {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding: 0.5rem;
  background: #fff;
  border-bottom: 2px solid var(--tab-gray);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-padding-left: 1rem;
  gap: 0.25rem;
  cursor: grab;
}

.red-tab::-webkit-scrollbar {
  display: none;
}

.red-tab .tab-title {
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  white-space: nowrap;
  transition: all 0.3s;
  flex-shrink: 0;
  min-width: fit-content;
}

.red-tab .tab-title.active {
  border-bottom: 3px solid var(--tab-main);
  color: var(--tab-main);
  font-weight: bold;
  background-color: #f9f9f9;
  border-radius: 6px 6px 0 0;
}

/* Tab Content */
.tab-content {
  display: none;
  height: var(--tab-height);
  background: #fff;
  padding: 1rem;
  border-radius: 0 0 10px 10px;
  overflow-y: auto;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.tab-content.active {
  display: block;
}

/* Post List Styles */
.wp-tab-post-list {
  list-style: none;
  padding-left: 1rem;
  margin: 0;
}

.wp-tab-post-list li {
  margin: 0.75rem 0;
  padding: 0.25rem 0;
  border-bottom: 1px solid #eee;
}

.wp-tab-post-list li:last-child {
  border-bottom: none;
}

/* Loading Spinner */
.tab-loading {
  display: none;
  justify-content: center;
  align-items: center;
  height: 50px;
  color: var(--tab-main);
  font-style: italic;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  :root {
    --tab-height: 252px; 
  }

  .red-tab {
    padding: 0.25rem;
    gap: 0.15rem;
  }
  
  .red-tab .tab-title {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .red-tab {
    gap: 0.1rem;
  }
  
  .red-tab .tab-title {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
}