.home-layout {
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: 28px 24px 48px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1180px);
  gap: 32px;
  align-items: start;
}

.home-content {
  min-width: 0;
}

/* Keep the user's existing preference to hide the extra brand title. */
.brand-copy strong {
  display: none;
}

.category-sidebar {
  position: sticky;
  top: 124px;
  max-height: calc(100vh - 148px);
  overflow-y: auto;
  padding: 18px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(17, 27, 36, .04);
}

.category-sidebar h2 {
  margin: 0 0 12px;
  padding: 0 9px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  line-height: 1.3;
}

.home-sidebar-link,
.all-products-link,
.category-sidebar-list a {
  display: block;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
}

.home-sidebar-link {
  margin-bottom: 8px;
  background: var(--ink);
  color: #fff !important;
  font-weight: 750;
}

.home-sidebar-link:hover {
  background: #263744;
  color: #fff !important;
}

.all-products-link {
  margin-bottom: 5px;
  background: #f2f6fc;
  color: #205fca;
  font-weight: 750;
}

.category-sidebar-list,
.category-sidebar-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-sidebar-list ul {
  margin: 2px 0 5px 12px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.category-sidebar-list a:hover,
.category-sidebar-list .current-cat > a {
  background: #f2f6fc;
  color: #205fca;
}

.category-sidebar-empty {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1050px) {
  .home-layout {
    grid-template-columns: 205px minmax(0, 1fr);
    gap: 22px;
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 760px) {
  .home-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 15px 36px;
  }

  .category-sidebar {
    position: static;
    width: 100%;
    max-height: none;
    padding: 12px;
  }

  .category-sidebar h2 {
    margin-bottom: 8px;
    padding-bottom: 8px;
  }

  .category-sidebar-list {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 2px;
  }

  .category-sidebar-list > li {
    flex: 0 0 auto;
  }

  .category-sidebar-list ul {
    display: none;
  }
}


