/* Dynamic catalog categories for the Version 2 homepage */
.categories {
  padding: 18px 0 16px !important;
  margin-top: 0 !important;
  background:
    linear-gradient(180deg, rgba(239, 249, 246, 0.72) 0%, rgba(255, 255, 255, 0.98) 100%) !important;
  border-top: 0 !important;
  border-bottom: 1px solid rgba(218, 231, 226, 0.92) !important;
}

.categories__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
}

.categories__eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #07846f;
  font-size: 9px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.categories__title {
  margin: 0;
  color: #17211f;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.categories__hint {
  margin: 0 0 2px;
  color: #71817c;
  font-size: 10.5px;
  line-height: 1.35;
  font-weight: 650;
  white-space: nowrap;
}

.categories-scroll {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 9px !important;
  overflow: visible !important;
  padding: 0 !important;
  scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
  display: none;
}

.category-chip {
  min-width: 0;
  min-height: 58px;
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 11px !important;
  border: 1px solid rgba(211, 226, 220, 0.94) !important;
  border-radius: 14px !important;
  color: #34423e !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 10px 22px -22px rgba(7, 72, 60, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  text-align: left;
  white-space: normal !important;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease !important;
}

.category-chip:hover {
  transform: translateY(-1px) !important;
  color: #056455 !important;
  border-color: rgba(7, 132, 111, 0.30) !important;
  background: #f7fcfa !important;
  box-shadow: 0 12px 24px -20px rgba(7, 72, 60, 0.58);
}

.category-chip__icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: #07846f;
  background: #eaf7f3;
  border: 1px solid rgba(7, 132, 111, 0.12);
  transition: color 160ms ease, background 160ms ease;
}

.category-chip__icon svg {
  width: 18px;
  height: 18px;
}

.category-chip__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.category-chip__label {
  overflow: hidden;
  color: inherit;
  font-size: 11.5px;
  line-height: 1.1;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-chip__meta {
  color: #879590;
  font-size: 8.5px;
  line-height: 1;
  font-weight: 700;
}

.category-chip__count {
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  color: #687873;
  background: #f0f5f3;
  font-size: 8.5px;
  line-height: 1;
  font-weight: 850;
}

.category-chip.active {
  color: #ffffff !important;
  border-color: transparent !important;
  background: linear-gradient(135deg, #0a8c75 0%, #056455 100%) !important;
  box-shadow: 0 14px 26px -20px rgba(5, 100, 85, 0.92) !important;
}

.category-chip.active .category-chip__icon {
  color: #056455;
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.72);
}

.category-chip.active .category-chip__meta {
  color: rgba(255, 255, 255, 0.70);
}

.category-chip.active .category-chip__count {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.category-chip:focus-visible {
  outline: 3px solid rgba(7, 132, 111, 0.22);
  outline-offset: 3px;
}

@media (max-width: 767px) {
  .categories {
    padding: 14px 0 12px !important;
  }

  .categories__head {
    align-items: flex-start;
    margin-bottom: 10px;
  }

  .categories__title {
    font-size: 16px;
  }

  .categories__hint {
    display: none;
  }

  .categories-scroll {
    display: flex !important;
    gap: 8px !important;
    margin-inline: -12px;
    padding: 0 12px 5px !important;
    overflow-x: auto !important;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .category-chip {
    min-width: 145px;
    min-height: 54px;
    flex: 0 0 auto;
    grid-template-columns: 33px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 9px !important;
    border-radius: 13px !important;
    scroll-snap-align: start;
  }

  .category-chip__icon {
    width: 33px;
    height: 33px;
    border-radius: 10px;
  }

  .category-chip__icon svg {
    width: 16px;
    height: 16px;
  }

  .category-chip__label {
    font-size: 10.5px;
  }

  .category-chip__meta {
    font-size: 8px;
  }

  .category-chip__count {
    min-width: 22px;
    height: 22px;
    padding-inline: 5px;
    font-size: 8px;
  }
}

@media (max-width: 380px) {
  .category-chip {
    min-width: 138px;
  }
}

/* v2.1 compact category toolbar */
.categories {
  padding: 9px 0 !important;
}

.categories > .container {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.categories__head {
  display: block;
  margin: 0;
}

.categories__eyebrow,
.categories__hint {
  display: none;
}

.categories__title {
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.categories-scroll {
  display: flex !important;
  gap: 7px !important;
  overflow-x: auto !important;
  padding: 2px 1px !important;
}

.category-chip {
  min-width: 0;
  min-height: 40px;
  flex: 0 0 auto;
  grid-template-columns: 26px auto auto;
  gap: 7px;
  padding: 5px 9px !important;
  border-radius: 11px !important;
}

.category-chip__icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.category-chip__icon svg {
  width: 14px;
  height: 14px;
}

.category-chip__copy {
  display: block;
}

.category-chip__label {
  font-size: 10px;
  line-height: 1;
}

.category-chip__meta {
  display: none;
}

.category-chip__count {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  font-size: 7.5px;
}

@media (max-width: 767px) {
  .categories {
    padding: 7px 0 !important;
  }

  .categories > .container {
    display: block;
  }

  .categories__head {
    display: none;
  }

  .categories-scroll {
    margin-inline: -12px;
    gap: 6px !important;
    padding: 1px 12px 3px !important;
  }

  .category-chip {
    min-width: 0;
    min-height: 38px;
    grid-template-columns: 25px auto auto;
    gap: 6px;
    padding: 5px 8px !important;
    border-radius: 10px !important;
  }

  .category-chip__icon {
    width: 25px;
    height: 25px;
  }

  .category-chip__label {
    font-size: 9.5px;
  }

  .category-chip__count {
    min-width: 19px;
    height: 19px;
    font-size: 7px;
  }
}

/* v2.2 align category label and filters as one compact toolbar */
@media (min-width: 768px) {
  .categories > .container {
    grid-template-columns: auto auto;
    justify-content: start;
    gap: 16px;
  }

  .categories-scroll {
    max-width: 100%;
  }
}
