.home-category-browser {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.home-category-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e2ddd3;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(23, 27, 34, .045);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.home-category-group[open] {
  border-color: #d2aa47;
  box-shadow: 0 14px 30px rgba(23, 27, 34, .09);
}

.home-category-summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 16px;
  gap: 9px;
  align-items: center;
  min-height: 67px;
  padding: 10px 11px;
  list-style: none;
  color: #172033;
  cursor: pointer;
  user-select: none;
}

.home-category-summary::-webkit-details-marker {
  display: none;
}

.home-category-summary:hover {
  background: #fffaf0;
}

.home-category-summary:focus-visible {
  outline: 3px solid rgba(25, 76, 149, .22);
  outline-offset: -3px;
}

.home-category-initial {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #172033;
  color: #fad200;
  font-size: 15px;
  font-weight: 900;
}

.home-category-summary-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.home-category-summary-copy strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.home-category-summary-copy small {
  color: #697386;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.2;
}

.home-category-product-count {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef2f7;
  color: #4c586c;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.home-category-group[open] .home-category-product-count {
  background: #fff1bd;
  color: #73550d;
}

.home-category-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid #6f7785;
  border-bottom: 2px solid #6f7785;
  transform: rotate(45deg) translate(-2px, 2px);
  transition: transform .18s ease, border-color .18s ease;
}

.home-category-group[open] .home-category-chevron {
  border-color: #194c95;
  transform: rotate(225deg) translate(-1px, -1px);
}

.home-subcategory-panel {
  padding: 0 9px 9px;
  border-top: 1px solid #eee8de;
  background: #fcfbf8;
}

.home-category-all-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  margin: 8px 0 6px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #172033;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.home-category-all-link strong {
  flex: 0 0 auto;
  color: #fad200;
  font-size: 9px;
}

.home-subcategory-list {
  display: grid;
  gap: 3px;
  max-height: 225px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.home-subcategory-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 31px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #303a4c;
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.22;
}

.home-subcategory-list a:hover,
.home-subcategory-list a:focus-visible {
  border-color: #e4cc8c;
  background: #fff7dc;
  color: #172033;
  outline: 0;
}

.home-subcategory-list small {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #eef2f7;
  color: #556176;
  font-size: 8.5px;
  font-weight: 900;
}

.home-subcategory-empty {
  margin: 6px 0 0;
  padding: 8px;
  color: #737d8d;
  font-size: 10px;
}

@media (max-width: 1000px) {
  .home-category-browser {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .home-category-browser {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .home-category-summary {
    grid-template-columns: 30px minmax(0, 1fr) auto 14px;
    gap: 7px;
    min-height: 62px;
    padding: 8px;
  }

  .home-category-initial {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 13px;
  }

  .home-category-summary-copy strong {
    font-size: 10.5px;
  }

  .home-category-summary-copy small {
    font-size: 8.5px;
  }

  .home-category-product-count {
    min-width: 28px;
    height: 20px;
    padding: 0 6px;
    font-size: 8.5px;
  }

  .home-subcategory-list {
    max-height: 210px;
  }
}

@media (max-width: 430px) {
  .home-category-browser {
    grid-template-columns: 1fr;
  }

  .home-category-summary-copy strong {
    font-size: 11.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-category-group,
  .home-category-chevron {
    transition: none;
  }
}
