.products-page {
  background: #f6f8f5;
}

.products-hero {
  min-height: 360px;
  display: grid;
  align-items: end;
  gap: 24px;
  padding: clamp(84px, 12vw, 138px) clamp(18px, 5vw, 72px) 34px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(7, 23, 32, 0.78), rgba(7, 23, 32, 0.34)),
    url("../assets/hero-generators.jpg") center / cover;
}

.products-hero h1 {
  max-width: 780px;
  margin: 8px 0 14px;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 0.95;
}

.products-hero p {
  max-width: 660px;
  margin: 0;
  font-size: 19px;
}

.product-categories {
  padding: 30px clamp(18px, 5vw, 72px) 24px;
  background: #fff;
}

.product-category-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.product-category-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(26px, 4vw, 40px);
}

.product-category-heading > p {
  max-width: 600px;
  margin: 0;
  color: #5f6c68;
}

.primary-category-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.primary-category {
  min-width: 0;
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 16px;
  border: 1px solid #d8e1da;
  border-radius: 8px;
  color: #1c2e27;
  background: #f7f9f7;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.primary-category:hover {
  border-color: #6d9f84;
  background: #f0f7f3;
}

.primary-category.is-active {
  border-color: #12633f;
  color: #fff;
  background: #12633f;
  box-shadow: 0 8px 20px rgba(18, 99, 63, 0.2);
}

.primary-category strong,
.primary-category span,
.primary-category small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.primary-category strong {
  font-size: 16px;
}

.primary-category span,
.primary-category small {
  color: #61716a;
  font-size: 12px;
}

.primary-category.is-active span,
.primary-category.is-active small {
  color: rgba(255, 255, 255, 0.8);
}

.product-toolbar {
  position: sticky;
  top: 76px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 280px);
  gap: 14px;
  padding: 16px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(22, 32, 29, 0.1);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.products-admin-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px clamp(18px, 5vw, 72px);
  color: #163528;
  background: #e7f5ed;
  border-bottom: 1px solid #c8e5d4;
}

.products-admin-note[hidden] {
  display: none;
}

.products-admin-note strong,
.products-admin-note span {
  display: block;
}

.product-toolbar span {
  display: block;
  margin-bottom: 6px;
  color: #53615d;
  font-size: 13px;
  font-weight: 800;
}

.product-toolbar input,
.product-toolbar select {
  width: 100%;
  height: 46px;
  border: 1px solid #d6ded8;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  font: inherit;
}

.product-results {
  padding: 28px clamp(18px, 5vw, 72px) 70px;
}

.product-results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.product-results-head h2 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 44px);
}

#productCount {
  color: #5f6c68;
  font-weight: 800;
}

.web-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.web-product-card {
  overflow: hidden;
  border: 1px solid #dfe6df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(16, 32, 26, 0.08);
}

.web-product-image {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  background: linear-gradient(145deg, #edf4f1, #f9faf6);
}

.web-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.web-product-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.web-product-body h3 {
  margin: 0;
  font-size: 18px;
}

.web-product-body p {
  margin: 0;
  color: #5f6c68;
  font-size: 14px;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.product-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef4ef;
  color: #33433d;
  font-size: 12px;
  font-weight: 800;
}

.web-product-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.web-product-actions a {
  flex: 1;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #12633f;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.empty-products {
  grid-column: 1 / -1;
  padding: 34px;
  border: 1px dashed #cfd8d2;
  border-radius: 8px;
  background: #fff;
  color: #5f6c68;
  text-align: center;
}

@media (min-width: 780px) {
  .products-hero {
    grid-template-columns: 1fr auto;
  }

  .product-category-heading {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
    align-items: end;
  }
}

@media (max-width: 640px) {
  .primary-category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .primary-category {
    min-height: 104px;
    padding: 13px;
  }

  .product-toolbar {
    position: static;
    grid-template-columns: 1fr;
  }

  .products-admin-note {
    display: grid;
  }
}
