/* ================================
   CATEGORY CHIPS – MOBILE FIRST
================================ */

/* Sticky Wrapper for Category Chips */
.category-chips-sticky-wrapper {
  position: sticky;
  top: 0;
  z-index: 1019; /* Ensure it stays above other content */
  background-color: #FFFFFF; /* Changed to transparent */
  padding: 0.25rem 0; /* Add some vertical padding */
  margin-bottom: 0.25rem; /* Space below the sticky section */
  /* box-shadow: 0 1px 2px rgba(0,0,0,0.05); */ /* Removed shadow to make wrapper more invisible */
}

/* Navigation wrapper */
.chips-navigation-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: -15px !important;
  margin-right: -15px !important;
}

/* Scroll arrows (hidden on mobile) */
.scroll-arrow {
  display: none;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: all 0.2s ease;
}

.scroll-arrow i {
  font-size: 1.2rem;
  color: #333;
}

.scroll-arrow:hover {
  background: #f8f9fa;
}

/* Viewport */
.chips-viewport {
  flex-grow: 1;
  overflow: hidden;
  width: 100%;
}

/* Scroll Container */
.category-chips-container {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;

  overflow-x: auto;
  scroll-behavior: smooth;

  -ms-overflow-style: none;
  scrollbar-width: none;
}

.category-chips-container::-webkit-scrollbar {
  display: none;
}

/* Single Chip */
.chip {
  display: flex;
  flex-direction: row; /* Geändert von column zu row */
  align-items: center;
  justify-content: center;
  gap: 8px; /* Hinzugefügt */

  padding: 10px 18px;

  background-color: #fff;
  border-radius: 10px;
  border: 1px solid transparent;

  text-decoration: none;
  color: #212529;

  transition: all 0.2s ease;
  flex-shrink: 0;
}

/* Chip Icon (verschoben von kategorie_chips.php) */
.chip-icon {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 5px; /* Slightly rounded corners for the icon */
    flex-shrink: 0;   /* Verhindert, dass das Icon schrumpft */
    flex-basis: auto; /* Behält die Inhaltsgröße bei */
}

/* Chip Text (verschoben von kategorie_chips.php) */
.chip-name {
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 700; /* Changed to 700 for bold */
  font-style: normal; /* Changed to normal */
  text-align: center;
  line-height: 1.15;
  white-space: nowrap; /* Prevent text wrapping */
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}

/* Active State */
.chip.active {
  background-color: #C25B3A;
  color: #fff;
}

/* ================================
   DESKTOP ENHANCEMENTS
================================ */
@media (min-width: 992px) {

  .chips-section-wrapper {
    padding: 0.5rem 0;
    margin-bottom: 0.75rem;
  }

  .scroll-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .chip {
    padding: 12px 20px; /* Adjust padding for desktop */
  }

  .chip-image,
  .chip-image-placeholder {
    width: 56px;
    height: 56px;
    margin-bottom: 6px;
  }

  .chip-name {
    font-size: 17px;
  }
}
