/* ===== Category hero banner ===== */
.nh-cat-hero {
  position: relative;
  border-radius: var(--nh-radius-xl);
  overflow: hidden;
  min-height: 22rem;
  padding: 3.6rem 4rem;
  display: flex;
  align-items: center;
}

.nh-cat-hero--tint-sage {
  background: var(--nh-sage-tint);
}

.nh-cat-hero--tint-blush {
  background: var(--nh-blush);
}

.nh-cat-hero--tint-sand {
  background: var(--nh-sand);
}

.nh-cat-hero__content {
  position: relative;
  z-index: 1;
  max-width: 56rem;
}

.nh-cat-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--nh-white);
  color: var(--nh-ink);
  font-size: 1.25rem;
  font-weight: 700;
  padding: 0.7rem 1.4rem;
  border-radius: var(--nh-radius-pill);
  margin-bottom: 1.6rem;
}

.nh-cat-hero__badge svg {
  width: 1.4rem;
  height: 1.4rem;
  color: var(--nh-sage);
}

.nh-cat-hero__title {
  font-size: 3.2rem;
  font-weight: 900;
  margin: 0 0 1.2rem;
  letter-spacing: -0.02em;
  color: var(--nh-charcoal);
}

.nh-cat-hero__description {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.8;
  color: var(--nh-body);
  margin: 0;
}

.nh-cat-hero__art {
  position: absolute;
  bottom: 2rem;
  inset-inline-end: 4rem;
  color: rgba(43, 39, 34, 0.18);
  z-index: 0;
}

.nh-cat-hero__art svg {
  width: 9rem;
  height: 9rem;
}

@media screen and (max-width: 749px) {
  .nh-cat-hero {
    padding: 3rem 2.4rem;
    min-height: unset;
  }

  .nh-cat-hero__content {
    text-align: start;
    margin-inline-start: 0;
  }

  .nh-cat-hero__title {
    font-size: 2.4rem;
  }

  .nh-cat-hero__art {
    display: none;
  }
}

/* ===== Filter bar ===== */
.nh-cat-filter__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  margin: 2.4rem 0 1.2rem;
}

.nh-cat-filter__sort {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nh-cat-filter__sort-select {
  appearance: none;
  background: var(--nh-white);
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius-md);
  padding: 1rem 3.2rem 1rem 1.4rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--nh-ink);
  font-family: inherit;
  cursor: pointer;
}

.nh-cat-filter__sort svg {
  position: absolute;
  inset-inline-start: 1.2rem;
  width: 1rem;
  height: 1rem;
  color: var(--nh-muted);
  pointer-events: none;
}

.nh-cat-filter__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.nh-cat-filter__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.9rem 1.6rem;
  border-radius: var(--nh-radius-pill);
  border: 1px solid var(--nh-border);
  background: var(--nh-white);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--nh-body);
  cursor: pointer;
  font-family: inherit;
}

.nh-cat-filter__pill.is-active {
  background: var(--nh-sand);
  border-color: var(--nh-amber);
  color: var(--nh-amber-deep);
}

.nh-cat-filter__count {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--nh-muted);
  margin: 0 0 2rem;
}

/* ===== Product grid ===== */
.nh-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Without this, iPhone Safari refuses to shrink a grid item below its
   image's intrinsic width (500-1000px), blowing one card up to fill the
   whole screen. Chrome clamps this on its own; WebKit needs it explicit. */
.nh-cat-grid > li {
  min-width: 0;
}

@media screen and (max-width: 989px) {
  .nh-cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 480px) {
  .nh-cat-grid {
    gap: 1.2rem;
  }
}

/* ===== Product card ===== */
.nh-cat-card {
  display: flex;
  flex-direction: column;
  background: var(--nh-white);
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius-xl);
  overflow: hidden;
  transition: transform 0.18s ease;
}

.nh-cat-card:hover {
  transform: translateY(-3px);
}

.nh-cat-card__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 2rem;
}

.nh-cat-card__media--tint-0 {
  background: var(--nh-sand);
}

.nh-cat-card__media--tint-1 {
  background: var(--nh-blush);
}

.nh-cat-card__media--tint-2 {
  background: var(--nh-sage-tint);
}

/* height: auto + the image's own aspect-ratio instead of height: 100% —
   WebKit resolves a percentage height against the aspect-ratio parent
   unreliably and can render the image at its intrinsic size instead. */
.nh-cat-card__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.nh-cat-card__media svg {
  width: 6rem;
  height: 6rem;
  color: var(--nh-amber-deep);
  opacity: 0.75;
}

.nh-cat-card__badge {
  position: absolute;
  top: 1.2rem;
  inset-inline-start: 1.2rem;
  font-size: 1.15rem;
  font-weight: 800;
  padding: 0.4rem 1rem;
  border-radius: var(--nh-radius-pill);
  color: var(--nh-white);
}

.nh-cat-card__badge--new {
  background: var(--nh-sage);
}

.nh-cat-card__badge--sale {
  background: var(--nh-coral);
}

.nh-cat-card__body {
  padding: 1.6rem 1.8rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.nh-cat-card__rating {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--nh-ink);
}

.nh-cat-card__rating svg {
  width: 1.2rem;
  height: 1.2rem;
  color: var(--nh-amber-gold);
}

.nh-cat-card__rating span {
  color: var(--nh-muted);
  font-weight: 500;
}

.nh-cat-card__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--nh-charcoal);
  text-decoration: none;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nh-cat-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.4rem;
}

.nh-cat-card__price {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--nh-charcoal);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.nh-cat-card__price s {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--nh-muted);
}

.nh-cat-card__cart {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: var(--nh-radius-md);
  border: 1px solid var(--nh-amber);
  background: var(--nh-white);
  color: var(--nh-amber-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.nh-cat-card__cart svg {
  width: 1.6rem;
  height: 1.6rem;
}

.nh-cat-card__cart.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ===== Promo card ===== */
.nh-cat-promo {
  background: var(--nh-charcoal);
  border-radius: var(--nh-radius-xl);
  padding: 2.4rem 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  min-height: 20rem;
}

.nh-cat-promo__badge {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  background: rgba(235, 177, 52, 0.15);
  color: var(--nh-amber-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.6rem;
}

.nh-cat-promo__heading {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--nh-cream);
  margin: 0 0 0.8rem;
}

.nh-cat-promo__text {
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.7;
  color: rgba(251, 248, 243, 0.65);
  margin: 0 0 1.6rem;
}

.nh-cat-promo__link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--nh-amber-gold);
  text-decoration: none;
}

.nh-cat-promo__link .icon-arrow {
  width: 1.2rem;
}
