.products-page #main-content {
  padding-top: calc(var(--header-top-h) + var(--header-bottom-h) + 24px + env(safe-area-inset-top));
}

.products-hub {
  padding: 0 0 var(--space-section);
  background: var(--bg-page);
}

.products-hub__head {
  margin: 0 0 28px;
}

.products-hub__title {
  margin: 0;
  font-size: var(--typo-h2-size);
  line-height: var(--typo-h2-line-height);
  font-weight: var(--typo-h2-weight);
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.products-hub__layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.products-hub__sidebar {
  position: sticky;
  top: calc(var(--header-sticky-bottom-h) + 20px + env(safe-area-inset-top));
  align-self: start;
  margin: 0;
}

.products-hub-sidebar__list {
  margin: 0;
}

.products-hub-sidebar__item {
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0) 100%),
    var(--bg-panel-soft);
}

.products-hub-sidebar__item + .products-hub-sidebar__item {
  margin-top: 10px;
}

.products-hub-sidebar__category,
.products-hub-sidebar__subcategory,
.products-hub-sidebar__child {
  width: 100%;
  margin: 0;
  border: none;
  background: transparent;
  font: inherit;
  text-align: left;
  transition:
    background-color var(--transition-base),
    color var(--transition-base);
}

.products-hub-sidebar__category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--text-primary);
}

.products-hub-sidebar__category.has-children::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.72;
  margin-top: -4px;
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.products-hub-sidebar__category.has-children.is-active::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.products-hub-sidebar__category.is-active {
  background: rgba(255, 255, 255, 0.07);
}

.products-hub-sidebar__subcategories {
  padding: 8px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.products-hub-sidebar__subcategory {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 500;
  color: var(--text-dim);
}

.products-hub-sidebar__subcategory.is-active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.products-hub-sidebar__subcategory-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.products-hub-sidebar__children {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 2px 8px;
  padding-left: 10px;
}

.products-hub-sidebar__child {
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.25;
  color: var(--text-dim);
}

.products-hub-sidebar__child.is-active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.products-hub__content {
  min-width: 0;
}

.products-hub__tabs {
  display: none;
}

.products-hub__cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.products-hub-card {
  display: flex;
  flex-direction: column;
  min-height: 428px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  overflow: hidden;
  color: var(--text-primary);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 96, 0, 0.12) 0%, rgba(255, 96, 0, 0) 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0) 100%),
    var(--bg-panel-soft);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.products-hub-card__main {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  cursor: pointer;
}

.products-hub-card__media {
  position: relative;
  display: block;
  height: clamp(190px, 20vw, 242px);
  overflow: hidden;
}

.products-hub-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 9, 11, 0.02) 18%, rgba(8, 9, 11, 0.72) 100%);
}

.products-hub-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.products-hub-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  flex: 1;
}

.products-hub-card__title {
  margin: 0;
  font-size: 24px;
  line-height: 1.08;
  font-weight: 500;
  color: var(--text-primary);
}

.products-hub-card__description {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  color: var(--text-muted);
}

button.products-hub-card__lead {
  margin: 0 16px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: calc(100% - 32px);
  align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  min-height: 36px;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color var(--transition-base),
    background-color var(--transition-base),
    color var(--transition-base);
}

.products-hub-card:focus-within {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow:
    var(--focus-ring),
    0 12px 28px rgba(0, 0, 0, 0.28);
}

.products-hub-card__main:focus-visible {
  outline: none;
}

button.products-hub-card__lead:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 96, 0, 0.2);
}

.products-hub__seo {
  margin-top: 28px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0) 100%),
    var(--bg-panel-soft);
}

.products-hub__seo-title {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.08;
  font-weight: 600;
  color: var(--text-primary);
}

.products-hub__seo-content {
  font-size: 16px;
  line-height: 1.42;
  color: var(--text-muted);
}

.products-hub__seo-content p {
  margin: 0 0 10px;
}

.products-hub__seo-content p:last-child {
  margin-bottom: 0;
}

.products-hub__seo-content ul,
.products-hub__seo-content ol {
  margin: 0 0 10px;
  padding-left: 18px;
}

@media (hover: hover) and (pointer: fine) {
  .products-hub-sidebar__category:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .products-hub-sidebar__subcategory:hover,
  .products-hub-sidebar__child:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
  }

  .products-hub-card:hover {
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  }

  .products-hub-card:hover .products-hub-card__image {
    transform: scale(1.04);
  }

  button.products-hub-card__lead:hover {
    background: rgba(255, 96, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
  }
}

@media (max-width: 1199px) {
  .products-page #main-content {
    padding-top: calc(72px + 20px + env(safe-area-inset-top));
  }

  .products-hub__layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .products-hub__sidebar {
    top: calc(72px + 16px + env(safe-area-inset-top));
  }
}

@media (max-width: 1023px) {
  .products-hub__layout {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 16px;
  }

  .products-hub__cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .products-page #main-content {
    padding-top: calc(68px + 16px + env(safe-area-inset-top));
  }

  .products-hub__head {
    margin-bottom: 20px;
  }

  .products-hub__layout {
    display: block;
  }

  .products-hub__sidebar {
    display: none;
  }

  .products-hub__tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0 0 10px;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.03);
    scrollbar-width: none;
  }

  .products-hub__tabs::-webkit-scrollbar {
    display: none;
  }

  .products-hub__tabs--level-2 {
    margin-bottom: 10px;
  }

  .products-hub__tabs--level-3 {
    border: none;
    background: transparent;
    padding: 0 2px 6px;
    margin-bottom: 14px;
  }

  .products-hub__tab {
    border: none;
    margin: 0;
    background: transparent;
    color: var(--text-dim);
    border-radius: var(--radius-pill);
    padding: 12px 16px;
    min-height: 42px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .products-hub__tab.is-active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
  }

  .products-hub__cards {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(276px, 84vw);
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .products-hub__cards::-webkit-scrollbar {
    display: none;
  }

  .products-hub__card-item {
    scroll-snap-align: start;
  }

  .products-hub-card {
    min-height: 430px;
  }

  .products-hub-card__title {
    font-size: 20px;
  }

  .products-hub-card__description,
  .products-hub__seo-content {
    font-size: 14px;
  }

  .products-hub__seo {
    margin-top: 20px;
    padding: 16px;
  }

  .products-hub__seo-title {
    font-size: 24px;
  }
}

html[data-theme="light"] .products-hub-sidebar__category.is-active,
html[data-theme="light"] .products-hub-sidebar__subcategory.is-active,
html[data-theme="light"] .products-hub-sidebar__child.is-active,
html[data-theme="light"] .products-hub__tab.is-active {
  background: var(--active-bg);
}

html[data-theme="light"] .products-hub-sidebar__item,
html[data-theme="light"] .products-hub-card,
html[data-theme="light"] .products-hub__seo,
html[data-theme="light"] .products-hub__tabs {
  background:
    linear-gradient(180deg, rgba(17, 22, 28, 0.03) 0%, rgba(17, 22, 28, 0) 100%),
    #f7f9fc;
}

html[data-theme="light"] .products-hub-card__lead {
  border-color: var(--chip-border);
  background: var(--chip-bg);
}

html[data-theme="light"] .products-hub-card__media::after {
  background: linear-gradient(
    180deg,
    var(--media-overlay-soft) 18%,
    var(--media-overlay-strong) 100%
  );
}

html[data-theme="light"] .products-hub-card:focus-within,
html[data-theme="light"] .products-hub-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .products-hub-card {
  border-color: rgba(16, 20, 24, 0.16);
  box-shadow: 0 8px 20px rgba(16, 20, 24, 0.1);
}

html[data-theme="light"] button.products-hub-card__lead:focus-visible {
  border-color: rgba(16, 20, 24, 0.22);
  background: rgba(17, 22, 28, 0.06);
}

@media (hover: hover) and (pointer: fine) {
  html[data-theme="light"] button.products-hub-card__lead:hover {
    background: rgba(17, 22, 28, 0.08);
    border-color: rgba(16, 20, 24, 0.22);
  }
}
