/* Shop page CSS: only what the kit lacks. */
.tile--square { --tile-ratio: 1 / 1; }
#shop .tile { --tile-ratio: 7 / 8; }               /* the home row: three tall tiles fill the screen */
#contact .close__word { line-height: 1.08; }      /* Instrument Serif's tall caps need the room */

/* Inner pages (shop, product, bag, custom order, admin): sections grow with what they hold. */
.inner main > section { height: auto; min-height: calc(100svh - 160px); padding-top: calc(var(--nav) + var(--s-8)); padding-bottom: var(--s-9); }
.inner main h1 { font: var(--display-weight) clamp(38px, 3.2vw + 18px, 60px)/1.05 var(--font-display); letter-spacing: var(--display-tracking); margin-bottom: var(--s-5); }
.inner .page-lead { max-width: 62ch; margin-bottom: var(--s-8); }
.site-foot { padding-block: var(--s-7); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-7); justify-content: space-between; align-items: center; font-size: var(--t-small); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: var(--s-5); }
.site-foot a { color: inherit; }
.back { display: inline-block; margin-bottom: var(--s-6); }

/* Product page */
.pd { align-items: start; }
.pd__main { aspect-ratio: 1 / 1; border-radius: var(--r-lg); overflow: clip; background: var(--surface); }
.pd__main img { width: 100%; height: 100%; object-fit: cover; }
.pd__thumbs { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-4); }
.pd__thumbs button { width: 72px; height: 72px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: clip; background: none; cursor: pointer; }
.pd__thumbs button[aria-current="true"] { outline: 2px solid var(--action); outline-offset: 2px; }
.pd__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd__info { display: grid; gap: var(--s-5); align-content: start; }
.pd__price { font-size: var(--t-lead); }
.pd__desc { white-space: pre-line; max-width: 52ch; }
.qty { display: grid; gap: var(--s-2); width: 120px; font-size: var(--t-small); font-weight: 500; }
.qty select, .bag-line select { height: 48px; padding-inline: var(--s-3); border: 1px solid var(--line-strong, var(--line)); border-radius: var(--r-sm); background: var(--g-main, var(--bg)); color: var(--ink); font: inherit; font-size: 16px; }

/* Bag page */
.bag-lines { list-style: none; margin: 0; padding: 0; }
.bag-line { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: var(--s-2) var(--s-5); align-items: center; padding-block: var(--s-5); border-bottom: 1px solid var(--line); }
.bag-line img { width: 88px; height: 88px; object-fit: cover; border-radius: var(--r-sm); grid-row: span 2; }
.bag-line__name { font-weight: 500; }
.bag-line__ctrl { display: flex; gap: var(--s-4); align-items: center; }
.bag-line__price { text-align: right; font-variant-numeric: tabular-nums; }
.bag-total { display: flex; justify-content: space-between; font-size: var(--t-lead); padding-top: var(--s-5); }
.linkbtn { background: none; border: 0; padding: 0; min-height: 44px; color: var(--action); font: inherit; text-decoration: underline; cursor: pointer; }
.done { padding: var(--s-7); border-radius: var(--r-lg); background: var(--surface); display: grid; gap: var(--s-4); max-width: 640px; }

/* Admin dashboard */
.admin-tabs { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-7); }
.admin-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.admin-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-4); margin-bottom: var(--s-5); }
.admin-list { display: grid; gap: var(--s-4); }
.admin-card { display: grid; gap: var(--s-3); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-md); background: color-mix(in oklab, var(--surface) 35%, var(--bg)); }
.admin-card__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); align-items: baseline; }
.admin-card__top h3 { font: 500 var(--t-card)/1.3 var(--font-text); }
.admin-card dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s-1) var(--s-5); margin: 0; }
.admin-card dt { color: var(--muted); font-size: var(--t-small); }
.admin-card dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.admin-card__ctrl { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: end; }
.admin-card__ctrl .field { min-width: 160px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: var(--t-label); font-weight: 500; background: var(--surface); }
.badge--new { background: var(--action); color: var(--action-ink); }
.admin-filter { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.admin-prod { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: var(--s-4); align-items: center; }
.admin-prod img, .admin-prod .ph { width: 72px; height: 72px; border-radius: var(--r-sm); object-fit: cover; background: var(--surface); }
.img-list { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.img-list figure { position: relative; margin: 0; width: 96px; }
.img-list img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r-sm); }
.check { display: flex; gap: var(--s-3); align-items: center; min-height: 44px; font-weight: 500; }
.check input { width: 20px; height: 20px; }
@media (max-width: 639px) {
  .bag-line { grid-template-columns: 64px minmax(0, 1fr); }
  .bag-line img { width: 64px; height: 64px; }
  .bag-line__price { grid-column: 2; text-align: left; }
  .admin-prod { grid-template-columns: 56px minmax(0, 1fr); }
  .admin-prod img, .admin-prod .ph { width: 56px; height: 56px; }
  .admin-prod > :last-child { grid-column: 1 / -1; }
}
/* heroes.json, product hero at 390: a photograph shows at its own ratio (390x293), so the hero ends on the fold */
@media (max-width: 639px) { .hero--product .hero__stage { aspect-ratio: 4 / 3; } }
