.home-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(24rem, 36vw, 34rem);
  margin-block-start: 1rem;
  overflow: hidden;
  border-radius: 1rem;
  background: #f1e9dc;
}

.home-hero__picture {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: block;
}

.home-hero__picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right 55%;
}

.home-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #f1e9dc 0%, #f1e9dcdd 25%, #f1e9dc00 59%);
  content: "";
  pointer-events: none;
}

.home-hero__copy {
  width: min(46%, 36rem);
  padding: 3.5rem 0 3.5rem clamp(2rem, 5vw, 5rem);
}

.home-hero__copy h1 {
  max-width: 10em;
  margin: 0;
  color: #1c2521;
  font-size: clamp(2.5rem, 4.4vw, 4.125rem);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.home-hero__copy p {
  max-width: 20rem;
  margin: 1.25rem 0 0;
  color: #3e4b43;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.5;
}

.home-hero__action {
  margin-block-start: 1.5rem;
}

.home-section {
  margin-block-start: clamp(2rem, 4.1vw, 3.75rem);
  scroll-margin-block-start: 6rem;
}

.home-section__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 1rem;
}

.home-section__heading h2,
.home-story h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 640;
  line-height: 1.2;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-grid li {
  min-width: 0;
}

.category-tile {
  display: flex;
  align-items: center;
  gap: clamp(0.625rem, 1.12vw, 1rem);
  width: 100%;
  height: 100%;
  min-height: 6.5rem;
  padding: 0.75rem clamp(0.625rem, 1vw, 1rem);
  border: 1px solid #dde5e0;
  border-radius: 0.75rem;
  background: #fff;
  color: #1c2521;
  text-align: left;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.category-tile:hover,
.category-tile[aria-pressed="true"] {
  border-color: #799387;
  background: #f4f6f5;
}

.category-tile:focus-visible {
  outline-offset: -3px;
}

.category-tile img {
  display: block;
  flex: none;
  width: clamp(3.25rem, 5.5vw, 5rem);
  height: clamp(3.25rem, 5.5vw, 5rem);
  border-radius: 50%;
  background: #f1ece4;
  object-fit: cover;
}

.category-tile span {
  min-width: 0;
}

.products-section__reset {
  flex-shrink: 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  row-gap: 1.75rem;
}

.home-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
}

.home-card[hidden] {
  display: none;
}

.home-card__media {
  position: relative;
  aspect-ratio: 1;
  border-radius: 0.75rem;
  background: #f1f0eb;
}

.home-card__media > a {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.home-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.home-card__favorite {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  padding: 0;
  border: 1px solid #dde5e0;
  border-radius: 50%;
  background: #fff;
  color: #25342e;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.home-card__favorite:hover,
.home-card__favorite[aria-pressed="true"] {
  background: #eaf1ed;
  color: #17624d;
}

.home-card__favorite[aria-pressed="true"] svg {
  fill: #17624d;
}

.home-card__body {
  padding: 0.75rem 0.125rem 0;
}

.home-card__price {
  margin: 0 0 0.1875rem;
  font-size: 1.125rem;
  font-weight: 690;
  line-height: 1.375;
}

.home-card h3 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 560;
  line-height: 1.4;
}

.home-card h3 a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.home-card h3 a:hover {
  color: #17624d;
  text-decoration: underline;
}

.home-card__description {
  margin: 0.3rem 0 0;
  color: #52605a;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.products-section__empty {
  margin: 0;
  padding: 1rem;
  border: 1px solid #dde5e0;
  border-radius: 0.75rem;
  color: #52605a;
}

.home-story {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: stretch;
  overflow: hidden;
  border-radius: 1rem;
  background: #f1ece2;
}

.home-story__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 18rem;
  max-height: 28rem;
  object-fit: cover;
  object-position: center 55%;
}

.home-story__copy {
  align-self: center;
  padding: 2rem clamp(1.5rem, 5vw, 5rem);
}

.home-story__copy p {
  max-width: 25rem;
  margin: 0.75rem 0 1.5rem;
  color: #45554c;
}

.home-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-block: clamp(2rem, 4vw, 3.5rem);
  padding-block: clamp(1.25rem, 3vw, 2rem);
  border-block: 1px solid #dde5e0;
  scroll-margin-block-start: 6rem;
}

.home-benefit {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.home-benefit svg {
  flex: none;
  margin-top: 0.125rem;
  color: #17624d;
}

.home-benefit strong,
.home-benefit span {
  display: block;
}

.home-benefit strong {
  font-size: 0.9375rem;
  font-weight: 650;
}

.home-benefit span {
  color: #52605a;
  font-size: 0.875rem;
}

@media (max-width: 1050px) {
  .category-tile {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    min-height: 7.75rem;
  }

  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 850px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-hero__copy {
    width: 51%;
  }
}

@media (max-width: 700px) {
  .home-hero {
    display: block;
    min-height: auto;
    margin-block-start: 0.75rem;
  }

  .home-hero::after {
    content: none;
  }

  .home-hero__picture {
    position: static;
    aspect-ratio: 3 / 2;
  }

  .home-hero__picture img {
    object-position: center 52%;
  }

  .home-hero__copy {
    width: auto;
    padding: 1.25rem 1.25rem 1.5rem;
  }

  .home-hero__copy h1 {
    max-width: 12em;
    font-size: clamp(1.875rem, 7.9vw, 2.375rem);
    letter-spacing: -0.045em;
    text-wrap: initial;
  }

  .home-hero__copy p {
    margin-block-start: 0.625rem;
  }

  .home-hero__action {
    margin-block-start: 1rem;
  }

  .category-grid {
    grid-template-columns: unset;
    grid-auto-flow: column;
    grid-auto-columns: max(7.5rem, 33%);
    margin-inline: -0.125rem;
    padding: 0.125rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }

  .category-tile {
    align-items: center;
    border-color: transparent;
    text-align: center;
    scroll-snap-align: start;
  }

  .category-tile img {
    width: 3.75rem;
    height: 3.75rem;
  }

  .products-section__heading {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 0.75rem;
  }

  .home-story {
    grid-template-columns: 1fr;
  }

  .home-story__image {
    min-height: 0;
    aspect-ratio: 3 / 2;
  }

  .home-story__copy {
    padding: 1.25rem 1.25rem 1.5rem;
  }

  .home-benefits {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 359px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

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