#index .product-section .section-heading h2 {
  color: #171d21;
}

#index .product-section .section-heading > a {
  color: #5a4300;
}

#index .product-section .section-heading > a:is(:hover, :focus-visible) {
  color: #171d21;
  text-decoration: underline;
}

#index .product-section .section-heading > a:focus-visible {
  outline: 2px solid #171d21;
  outline-offset: 3px;
}

.product-card .product-info h3,
.zoyi-product-related .zoyi-related-copy h3,
body#order-confirmation .zoyi-order-recommendations__product-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  max-height: 3lh;
  overflow: hidden;
  color: #171d21;
  font-weight: 700;
}

.product-card .product-info h3 {
  min-height: 3lh;
}

.product-card .product-info h3:focus-within,
.zoyi-product-related .zoyi-related-copy h3:focus-within,
body#order-confirmation .zoyi-order-recommendations__product-name:focus-within {
  outline: 2px solid #171d21;
  outline-offset: 1px;
}

.product-card .product-info .product-prices {
  margin-top: 0;
}

.product-card .product-info > :is(form, .button) {
  margin-top: auto;
}

.zoyi-related-card .zoyi-related-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.zoyi-related-card .zoyi-related-view {
  margin-top: auto;
}

@supports (grid-template-rows: subgrid) {
  /* Give each row of cards shared tracks for the image, title, prices, stock and action. */
  :is(.product-grid, .listing-grid) > .product-card {
    display: grid;
    grid-row: span 5;
    grid-template-rows: subgrid;
    row-gap: 0;
  }

  .product-card > .product-media {
    grid-row: 1;
  }

  .product-card > .product-info {
    display: grid;
    grid-row: 2 / span 4;
    grid-template-rows: subgrid;
    row-gap: 0;
  }

  .product-card .product-info h3 {
    grid-row: 1;
    min-height: 0;
    align-self: start;
  }

  .product-card .product-info .product-prices {
    grid-row: 2;
    align-content: start;
  }

  .product-card .product-info .stock-state {
    grid-row: 3;
  }

  .product-card .product-info > :is(form, .button) {
    grid-row: 4;
    align-self: end;
  }

  .zoyi-related-list > .zoyi-related-card {
    grid-row: span 4;
    grid-template-rows: subgrid;
    row-gap: 0;
  }

  .zoyi-related-card > .zoyi-related-image {
    grid-area: 1 / 1 / span 4;
    width: 100%;
  }

  .zoyi-related-card > .zoyi-related-copy {
    display: grid;
    grid-area: 1 / 2 / span 4;
    grid-template-rows: subgrid;
    row-gap: 0;
  }

  .zoyi-related-copy h3 { grid-row: 1; align-self: start; }
  .zoyi-related-copy .zoyi-related-price { grid-row: 2; align-content: start; }
  .zoyi-related-copy .zoyi-related-stock { grid-row: 3; }
  .zoyi-related-copy .zoyi-related-view { grid-row: 4; align-self: end; }
}
