/* Product page: the pinned label opens beside a close crop; the Goes with hang is uneven on purpose. */

/* OPENING: on a phone the photograph comes first, the label under it; from 40rem the label stands the full height of the photograph at its left. */
.prod-open { display: grid; gap: var(--gap); align-items: start; padding-block: clamp(1.25rem, 4vh, 2.5rem); }
.prod-label { display: grid; width: 100%; max-width: none; gap: .5rem; justify-items: start; padding: 1.9rem 1.25rem 1.5rem; }
.prod-label .label__name { font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.375rem); }
.prod-kind { margin: 0; font-size: 1.125rem; }
.prod-label .label__price {
  justify-self: stretch; margin-top: .35rem;
  font: 400 2rem/1 var(--display); letter-spacing: .05em;
}
.prod-listed { font: 400 1rem/1.2 var(--text); letter-spacing: 0; }
.prod-lead { margin: .35rem 0 .4rem; font-size: clamp(1.0625rem, 1rem + .35vw, 1.1875rem); line-height: 1.5; }
.prod-foot { display: grid; gap: .6rem; justify-self: stretch; padding-top: .8rem; border-top: .125rem solid currentColor; }
.prod-pickup { margin: 0; font-size: 1.0625rem; line-height: 1.4; }
.prod-phone { margin: 0; font: 400 2rem/1 var(--display); letter-spacing: .05em; font-variant-numeric: tabular-nums; }
.prod-label .btn { justify-self: stretch; }
.prod-pic { position: relative; order: -1; aspect-ratio: 3 / 2; }
.prod-open--bare .prod-label { max-width: 44rem; }

/* The press-to-enlarge control is added by the script over the photograph. */
.zoom__open {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0;
  border: 0; background: none; cursor: zoom-in;
}
.zoom__open:focus-visible { outline: .1875rem solid var(--ink); outline-offset: -.9rem; }

/* The large photograph. */
.zoom {
  padding: 0; border: .125rem solid var(--ink); background: var(--ground); color: var(--ink);
  max-width: 96vw; max-height: 96vh;
}
.zoom::backdrop { background: rgb(23 66 26 / .85); }
.zoom__in { display: grid; gap: .75rem; padding: .75rem; justify-items: start; }
.zoom img {
  width: auto; max-width: min(90vw, 68rem); max-height: calc(96vh - 9rem);
  object-fit: contain; margin-inline: auto;
}
.zoom__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; width: 100%; }
.zoom__bar .cap { flex: 1 1 14rem; }

/* BODY: two paragraphs beside the ruled spec ledger. */
.prod-body__grid { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); }
.prod-text { font-size: clamp(1.125rem, 1rem + .5vw, 1.3125rem); line-height: 1.55; }
.prod-text p { margin-bottom: 1.1em; }
.prod-text p:last-child { margin-bottom: 0; }
.prod-note { margin-top: 1rem; }
.prod-body .facts dt { font-family: var(--text); }
.prod-body .facts dd { font-size: 1.125rem; }

/* GOES WITH: a tighter crop, two labels hung at different heights and angles, each filling the gap beside it. */
.section__head .lead { flex: 1 1 22rem; max-width: 46rem; margin: 0; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.pair__crop { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.pair__crop img { scale: 1.55; transform-origin: 85% 80%; object-position: 85% 80%; }
.pair__label { display: grid; max-width: none; }
.pair__label .label__name { overflow-wrap: anywhere; font-size: 1.125rem; }
.pair__label--1 { rotate: -2deg; }
.pair__label--2 { rotate: 2.5deg; margin-top: 2.25rem; }

/* MORE: three other dishes at decidedly different sizes; each label sits right under its own frame. */
.more { align-items: start; row-gap: 1.5rem; }
.more__item { text-decoration: none; color: inherit; }
.more__item--1 { grid-column: 1 / -1; }
.more__item--1 .pic { aspect-ratio: 16 / 10; }
.more__item--2 .pic, .more__item--3 .pic { aspect-ratio: 4 / 5; }
.more__item .label { max-width: 100%; }
.more__item .label__name { overflow-wrap: anywhere; }
.more__item .pic span, .more__item .pic img { display: block; }

@media (min-width: 40rem) {
  .prod-open { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: stretch; }
  .prod-open--bare { grid-template-columns: minmax(0, 1fr); }
  .prod-label { grid-template-rows: repeat(4, auto) 1fr; gap: .65rem; padding: 2.4rem 1.5rem 2rem; }
  .prod-label .label__price { font-size: clamp(2.25rem, 1.4rem + 2vw, 3rem); }
  .prod-lead { font-size: clamp(1.125rem, .9rem + .6vw, 1.3125rem); }
  .prod-foot { align-self: end; gap: .75rem; padding-top: 1rem; }
  .prod-phone { font-size: clamp(2rem, 1.4rem + 1.4vw, 2.5rem); }
  .prod-pic { order: 0; aspect-ratio: auto; min-height: clamp(18rem, calc(100vh - var(--bar-h) - 5rem), 40rem); }
  .prod-pic img { position: absolute; inset: 0; }

  .pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr); align-items: stretch; }
  .pair__crop { grid-column: 2; grid-row: 1; aspect-ratio: 5 / 4; }
  .pair__label { justify-self: stretch; padding: 2.2rem 1.4rem 1.5rem; }
  .pair__label .label__name { font-size: clamp(1.25rem, 1rem + .7vw, 1.5rem); }
  .pair__label .label__price { font-size: 1.25rem; }
  .pair__label--1 { grid-column: 1; grid-row: 1; align-self: start; margin-top: 2.5rem; rotate: -1.5deg; }
  .pair__label--2 { grid-column: 3; grid-row: 1; align-self: end; margin: 0 0 3rem; rotate: 1.5deg; }
  .pair--bare { grid-template-columns: repeat(2, minmax(0, 24rem)); }
  .pair--bare .pair__label { grid-column: auto; grid-row: auto; align-self: start; justify-self: stretch; margin: 0; }

  /* One shared line: every frame ends on it, every label starts just under it. */
  .more { align-items: stretch; row-gap: .6rem; }
  .more__item { grid-row: span 2; grid-template-rows: 1fr auto; grid-template-rows: subgrid; row-gap: .6rem; }
  .more__item .pic { align-self: end; }
  .more__item .label { grid-row: 2; align-self: start; }
  .more__item--1 { grid-column: span 5; }
  .more__item--1 .pic { aspect-ratio: 1; }
  .more__item--2 { grid-column: span 4; }
  .more__item--2 .pic { aspect-ratio: 4 / 3; }
  .more__item--3 { grid-column: span 3; }
  .more__item--3 .pic { aspect-ratio: 3 / 4; }
}

@media (min-width: 48rem) {
  .prod-body__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
}
