/* Allied Decorations Co · product.css — one item's crate label, its slip, its manual strip and the items packed with it. Desk first. */
:root { --thumb-width: 2.75rem; }

/* allpr — the pinned offer stands on its own solid plate on this page, so the panels and the prev / next links pass beneath it; allpw and allst share that ground (the phone band already has its ground in site.css) */
.allpr { background: var(--crate); }
.allpw { background: var(--crate); }
.allst { background: var(--crate); border-radius: 50%; }
@media (min-width: 56.0625rem) {
  .allpr {
    box-sizing: border-box; padding: .5rem;
    border: var(--hairline) solid var(--brass);
  }
  .allpt { margin-right: 0; }
}

/* allhb — the opening band: the crate label (3 of 8) beside the matted photograph (5 of 8), a first screen tall */
.allhb { flex: 1; align-items: stretch; }
.allhb .alllb { grid-column: 1 / 4; grid-template-columns: 1fr; align-content: start; gap: .85rem; }
.allhb .allno { font-size: clamp(2.25rem, 3.6vw, 3.25rem); }
.allhb .allds { grid-template-columns: 1fr; gap: .75rem; }
.allhb .allds > div { padding: .6rem .85rem .75rem; }

/* allkd — the item's kind, in plain words, standing under the name */
.allkd { margin: .45rem 0 0; color: var(--brass); font: 400 .95rem/1.4 var(--packing-slip); }
/* allmb — the "measured by" line; allln — the one line */
.allmb { margin: 0; font-size: 1.0625rem; line-height: 1.45; }
.allmb span { display: block; font-size: .9rem; color: var(--brass); }
.allln { margin: 0; font-size: 1.0625rem; line-height: 1.55; }

/* allmo — the month a stepper shows; allsg — its two double-ruled buttons */
.allhb .allds dd { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.allmo { min-width: 0; }
.allsg { display: inline-flex; gap: .35rem; flex: none; }
.allsg button {
  width: var(--thumb-width); height: var(--thumb-width); border: 0; cursor: pointer;
  background: var(--slip); color: var(--chalk); font: 700 1.4rem/1 var(--stencil);
  box-shadow: inset 0 0 0 .125rem var(--brass), inset 0 0 0 .3125rem var(--slip), inset 0 0 0 .375rem var(--brass);
}
.allsg button:hover, .allsg button:focus-visible {
  box-shadow: inset 0 0 0 .0625rem var(--brass), inset 0 0 0 .25rem var(--slip), inset 0 0 0 .375rem var(--brass);
}
html:not(.js) .allsg { display: none; }

/* allml — the mail line under the dates */
.allml { margin: 0; font-size: 1rem; }
.allml a { color: var(--brass); }

/* allhp — the hero photograph in its mat; allpk — the press that opens it large */
.allhp { grid-column: 4 / -1; min-height: 0; margin: .375rem; }
.allpk { display: block; flex: 1; min-height: 0; cursor: zoom-in; }
.allpk img { height: 100%; }

/* allld — the lead: head left at the full panel-head size, the lead sentence wide at the right */
.allld { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 1.25rem 2.5rem; align-items: start; }
.allld .allhs { font-size: 1.625rem; }
.alllt { margin: 0; font-size: 1.25rem; line-height: 1.6; }

/* allwk — the work row: the body panel over the three steps at the left (5 of 8), the packing slip down the right (3 of 8).
   The first row is as tall as the body; the second takes what is left, so both columns end on one line. */
.allwk { grid-template-rows: auto 1fr; }

/* allbd — the body panel, ending at its own content; allsl — the spec rows as a packing slip, the height of both left panels, its rows spread down it */
.allbd { grid-column: 1 / 6; grid-row: 1; display: grid; gap: 1.25rem; align-content: start; align-self: start; }
.allsl { grid-column: 6 / -1; grid-row: 1 / span 2; display: grid; grid-template-rows: auto 1fr; }
.allsl dl { margin: 1rem 0 0; display: grid; align-content: space-between; }
.allsl dl > div { padding: .7rem 0; border-top: .25rem double var(--brass); }
.allsl dt { font-size: .9rem; color: var(--brass); }
.allsl dd { margin: .2rem 0 0; font-size: 1.0625rem; line-height: 1.45; }

/* allmn — the manual panel under the body: three steps down it, each one number | step | result on one line, spread over the height the slip leaves */
.allmn { grid-column: 1 / 6; grid-row: 2; display: grid; grid-template-rows: auto 1fr; gap: 1.25rem; }
.allmn .allsp { display: grid; grid-template-columns: minmax(0, 1fr); align-content: space-between; }
.allmn .allsp li { grid-template-columns: 3.75rem minmax(0, 11rem) minmax(0, 1fr); align-items: baseline; align-content: start; }
.allmn .allsp li::before { grid-row: auto; }
.allmn .allsp li > b { grid-column: 2; }
.allmn .allsp li > .allrs { grid-column: 3; }
.allmn .allsp b { font: 800 1.6rem/1.1 var(--stencil); }
.allmn a { color: var(--brass); }

/* allho — the hand-off: call button, then the neighbours by number; allpn — prev / next */
.allho { display: grid; grid-template-columns: minmax(0, 1.3fr) auto; gap: 1.25rem 2rem; align-items: center; }
.allho .allhs { grid-column: 1 / -1; }
.allpn { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .75rem 1.5rem; }
.allpn a { display: grid; min-height: 2.75rem; align-content: center; font-size: 1rem; text-decoration: none; }
.allpn span { font: 800 1.4rem/1.1 var(--stencil); color: var(--brass); }
.allpn a:hover .allpn-x, .allpn a:hover { text-decoration: underline double var(--brass); }

/* allot — one panel: the head, then the items packed with it at 2:1:1, picture tops, picture bottoms and label plates on shared lines;
   allob one item, allos its label, allon number, allom name, alloc price */
.allot { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 1.25rem var(--crate-gap); align-items: stretch; }
.allot > .allhs { grid-column: 1 / -1; grid-row: 1; }
.allot .allhs a { color: var(--brass); }
.allob {
  grid-row: 2 / span 2; display: grid; grid-template-rows: 1fr auto; gap: .9rem;
  min-width: 0; color: var(--chalk); text-decoration: none;
}
@supports (grid-template-rows: subgrid) {
  .allob { grid-template-rows: subgrid; }
}
.allob:nth-of-type(1) { grid-column: 1 / 5; }
.allob:nth-of-type(2) { grid-column: 5 / 7; }
.allob:nth-of-type(3) { grid-column: 7 / -1; }
.allob .allph { grid-row: 1; margin: .375rem; min-height: 0; }
.allob:nth-of-type(1) .allph { aspect-ratio: 4 / 3; }
.allos { grid-row: 2; display: grid; gap: .2rem; align-content: start; padding: .9rem 1rem; }
.allon { font: 800 1.3rem/1 var(--stencil); color: var(--brass); }
.allom { font: 700 1.5rem/1.1 var(--stencil); }
.alloc { font-size: .9rem; }
.allob:hover .allom, .allob:focus-visible .allom { text-decoration: underline double var(--brass); }

/* allvw — the photograph opened large, in a dialog the script writes */
.allvw { max-width: min(92vw, 90rem); max-height: 90svh; padding: 0; border: 0; background: none; }
.allvw::backdrop { background: rgba(42, 6, 13, .88); }
.allvw .allph { max-height: 88svh; }
.allvw img { max-height: calc(88svh - 4rem); object-fit: contain; }
.allvw button { align-self: flex-end; margin-top: .4rem; }

@media (max-width: 70rem) {
  .allhb .alllb { grid-column: 1 / 5; }
  .allhp { grid-column: 5 / -1; }
}

@media (max-width: 56rem) {
  .allwk { grid-template-rows: none; }
  .allhb .alllb, .allhp, .allbd, .allsl, .allmn { grid-column: 1 / -1; }
  .allbd, .allsl, .allmn { grid-row: auto; }
  .allhp { aspect-ratio: 3 / 2; }
  .allld, .allho { grid-template-columns: 1fr; }
  .alllt { font-size: 1.0625rem; }
  .allmn .allsp li { grid-template-columns: 2.75rem minmax(0, 1fr); align-items: start; }
  .allmn .allsp li::before { grid-row: span 2; }
  .allmn .allsp li > .allrs { grid-column: 2; }
  .allpn { justify-content: flex-start; }
  .allot { grid-template-columns: 1fr; }
  .allot > .allhs { grid-row: auto; }
  .allob:nth-of-type(n) { grid-column: 1 / -1; grid-row: auto; grid-template-rows: auto; }
  .allob:nth-of-type(n) .allph { aspect-ratio: 3 / 2; }
}
