/* Shop presentation only: preserve product information, image files and disabled commerce. */
@supports (grid-template-rows: subgrid) {
  /* Share the natural height of each text row, including wrapped disclosures. */
  .catalog .product-grid { row-gap: 0; }
  .product-grid .product {
    display: grid;
    grid-row: span 7;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: subgrid;
    row-gap: 0;
    min-width: 0;
    margin-bottom: 36px;
  }
  .product-grid .product-photo { grid-row: 1; width: 100%; align-self: start; }
  .product-grid .product .product-meta,
  .product-grid .product:first-child .product-meta,
  .product-grid .product-meta > div,
  .product-grid .legacy-card { display: contents; }
  .product-grid .product-meta > div > p:first-child { grid-row: 2; margin: 14px 0 0; }
  .product-grid .product-meta h3 { grid-row: 3; margin: 6px 0 0; align-self: start; }
  .product-grid .product-meta .product-photo-note { grid-row: 4; margin: 8px 0 0; align-self: start; }
  .product-grid .legacy-card-label {
    grid-row: 5;
    display: block;
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
  .product-grid .legacy-card strong { grid-row: 6; margin: 4px 0 0; align-self: start; }
  .product-grid .legacy-card > span:last-child { grid-row: 7; margin: 4px 0 0; align-self: start; }
  .product-grid .product-meta > .price-pending {
    grid-row: 5 / span 3;
    align-self: start;
    margin-top: 14px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
  }
}

@media (min-width: 351px) and (max-width: 1000px) {
  .related-link { display: flex; flex-direction: column; }
  .related-photo { width: 100%; flex: none; align-self: stretch; }
  .related-info { flex: 1; }
  .related-more { margin-top: auto; padding-top: 18px; }
  @supports (grid-template-rows: subgrid) {
    .shop-related-grid { row-gap: 0; }
    .related-card { display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; }
    .related-link { display: grid; grid-row: 1 / -1; grid-template-rows: subgrid; row-gap: 0; }
    .related-info { display: contents; }
    .related-photo { grid-row: 1; align-self: start; }
    .related-info > * { margin-left: 12px; margin-right: 12px; }
    .related-info .eyebrow { grid-row: 2; margin-top: 16px; }
    .related-info h3 { grid-row: 3; margin-top: 10px; align-self: start; }
    .related-photo-note { grid-row: 4; align-self: start; }
    .related-price { grid-row: 5; align-self: start; }
    .related-more { grid-row: 6; justify-self: start; align-self: end; margin-top: 0; margin-bottom: 16px; }
  }
}

@media (max-width: 700px) {
  .catalog .filter-bar > span {
    width: 100%;
    max-width: none;
    text-align: left;
    font-size: 11px;
    padding-bottom: 0;
    margin-top: 8px;
  }
  @supports (grid-template-rows: subgrid) {
    .product-grid .product { margin-bottom: 28px; }
  }
  .product-grid .product-meta h3 { font-size: 16px; line-height: 1.35; }
  .product-grid .product-meta .product-photo-note,
  .product-grid .legacy-card-label,
  .product-grid .legacy-card > span:last-child { font-size: 12px; line-height: 1.5; letter-spacing: 0; }
  .product-grid .legacy-card strong { font-size: 18px; }
  .product-grid .product-photo .product-label { max-width: calc(100% - 18px); }
  .product-grid .product-meta > .price-pending { font-size: 12px; }
  .related-info h3 { overflow-wrap: break-word; }
  #shop-share-dialog { padding: 20px; max-height: calc(100dvh - 24px); }
  #shop-share-dialog h2 { font-size: 30px; min-width: 0; overflow-wrap: anywhere; }
  #shop-share-dialog input { font-size: 16px; }
  .shop-share-heading { gap: 10px; }
  .menu-toggle, .photo-close, .dialog-close { min-height: 44px; }
  .dialog-close { min-width: 44px; }
  .breadcrumbs a, .detail-source, .shirt-detail-note a,
  .footer nav a, .footer-bottom a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .footer nav { gap: 2px; }
  .detail-source { font-size: 12px; line-height: 1.5; }
}
