/* Shop — layered on top of site.css. Stays inside DESIGN.md tokens (ember, rules, mono, narrow). */

.page-stage .cue-card { margin-bottom: 40px; }

/* Featured cards: 3 stacked spearheads rather than a 2-up mosaic. */
.cards-grid--stack {
  grid-template-columns: 1fr;
}

.cards-grid--stack .card.is-spearhead {
  grid-template-columns: 1fr 1.15fr;
  min-height: 520px;
}

@media (max-width: 960px) {
  .cards-grid--stack .card.is-spearhead {
    grid-template-columns: 1fr;
  }
  .cards-grid--stack .card.is-spearhead .card-photo {
    min-height: 420px;
  }
}

/* ---------- Catalogue: client-side filters ---------- */

.shop-catalogue.section-shell {
  padding-top: 96px;
  padding-bottom: 24px;
}

.shop-filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.62fr) minmax(280px, 1fr) auto auto;
  gap: 1px;
  margin: 0 clamp(24px, 4vw, 56px);
  border-top: 1px solid var(--rule-bright);
  border-bottom: 1px solid var(--rule-bright);
  background: var(--rule);
}

.shop-control,
.shop-filter-status,
.shop-filter-reset {
  background: var(--bg);
  display: grid;
  gap: 10px;
  padding: 18px 22px;
}

.shop-control__label,
.shop-filter-status,
.shop-filter-reset {
  font-family: "Archivo Narrow", sans-serif;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.shop-control__label {
  color: var(--ember);
}

.shop-control select,
.shop-control input {
  width: 100%;
  border: 1px solid var(--rule-bright);
  border-radius: 0;
  background-color: rgba(10, 9, 6, 0.62);
  color: var(--ink);
  font: 300 17px/1.45 "Fraunces", serif;
  padding: 12px 14px;
}

.shop-control select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ember) 50%),
    linear-gradient(135deg, var(--ember) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.shop-control input::placeholder {
  color: var(--muted);
}

.shop-control select:focus,
.shop-control input:focus {
  border-color: var(--ember-dim);
  background-color: rgba(18, 16, 12, 0.86);
}

.shop-filter-status {
  align-content: center;
  min-width: 180px;
  color: var(--ink-dim);
}

.shop-filter-status [data-store-result-count] {
  font-family: "JetBrains Mono", monospace;
  font-size: 18px;
  letter-spacing: 0.12em;
  color: var(--ember);
}

.shop-filter-reset {
  all: unset;
  display: grid;
  place-items: center;
  min-width: 112px;
  padding: 18px 22px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  font-family: "Archivo Narrow", sans-serif;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s;
}

.shop-filter-reset:hover {
  background: var(--bg-raise);
  color: var(--ember);
}

.shop-empty {
  margin: 24px clamp(24px, 4vw, 56px) 0;
  border-top: 1px solid var(--rule-bright);
  border-bottom: 1px solid var(--rule-bright);
  padding: 20px 0;
  font-family: "Fraunces", serif;
  font-weight: 300;
  color: var(--ink-dim);
}

.shop-tile[hidden],
.shop-group[hidden],
.shop-empty[hidden] {
  display: none;
}

@media (max-width: 980px) {
  .shop-filter-panel {
    grid-template-columns: 1fr 1fr;
  }

  .shop-control--search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .shop-filter-panel {
    grid-template-columns: 1fr;
  }

  .shop-filter-status,
  .shop-filter-reset {
    min-width: 0;
  }
}

/* ---------- Catalogue: product grid ---------- */

.shop-group.section-shell {
  padding-top: 88px;
  padding-bottom: 48px;
}

.shop-group + .shop-group.section-shell {
  padding-top: 72px;
}

.shop-group .scene-head .runtime {
  text-align: right;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
  border-top: 1px solid var(--rule-bright);
  border-bottom: 1px solid var(--rule-bright);
}

@media (max-width: 1100px) {
  .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .shop-grid { grid-template-columns: 1fr; }
}

/* Tile */
.shop-tile {
  background: var(--bg);
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  padding: 18px 18px 22px;
  transition: background 0.3s;
  position: relative;
}

.shop-tile:hover {
  background: var(--bg-raise);
}

.shop-tile:hover .shop-tile__title {
  color: var(--ember);
}

.shop-tile:hover .photo-fill {
  filter: brightness(1.1) saturate(1.05) contrast(1.02);
}

.shop-tile:hover .shop-tile__meta span:last-child {
  color: var(--ember);
  transform: translateX(4px);
}

.shop-tile:hover .shop-tile__price {
  background: var(--ember);
  color: var(--bg);
  border-color: var(--ember);
}

.shop-tile__frame {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin-bottom: 18px;
  background: #050302;
  border: 1px solid var(--rule-bright);
  transition: filter 0.5s;
}

.shop-tile__frame .photo-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: contrast(1.04) brightness(0.94);
  transition: filter 0.5s;
}

.shop-tile__crop {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(237, 232, 220, 0.62);
  pointer-events: none;
}

.shop-tile__crop span:first-child {
  color: var(--ember);
  background: rgba(10, 9, 6, 0.7);
  padding: 3px 6px;
  backdrop-filter: blur(2px);
}

.shop-tile__crop span:last-child {
  background: rgba(10, 9, 6, 0.7);
  padding: 3px 6px;
  backdrop-filter: blur(2px);
}

.shop-tile__price {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 6px 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink);
  background: rgba(10, 9, 6, 0.82);
  border: 1px solid var(--ember-dim);
  backdrop-filter: blur(3px);
  transition: background 0.35s, color 0.35s, border-color 0.35s;
}

.shop-tile__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.shop-tile__title {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
  transition: color 0.25s;
  /* Two-line clamp keeps the grid regular. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-tile__meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--rule-bright);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.shop-tile__meta span:last-child {
  color: var(--ink-dim);
  transition: color 0.25s, transform 0.25s;
}

/* Slight accent: every 5th tile in a group gets an ember hairline top, like a crop mark. */
.shop-grid > .shop-tile:nth-child(4n+1) .shop-tile__frame {
  border-top-color: var(--ember-dim);
}

/* ---------- Product detail: gallery rail ---------- */

.shop-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 0 clamp(24px, 4vw, 56px);
}

.shop-gallery__plate {
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--rule-bright);
  padding: 10px 10px 6px;
}

.shop-gallery__plate img {
  width: 100%;
  height: auto;
  display: block;
  filter: contrast(1.04) brightness(0.95);
}

.shop-gallery__plate figcaption {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--rule-bright);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Product detail: About + specs split ----------
   First section (ABOUT THIS WORK) renders as prose on the left.
   Remaining short sections (INSTRUMENTATION/DURATION/etc.) stack as a
   dense specs panel on the right so a 3-paragraph About doesn't force
   a 600px dead rectangle next to a 3-word Instrumentation card. */

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.work-prose {
  /* reuses .contact-card chrome */
}

.work-specs {
  margin: 0;
  background: rgba(18, 16, 12, 0.7);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
}

.work-specs__item {
  padding: 20px 24px;
  border-bottom: 1px solid var(--rule);
}

.work-specs__item:last-child {
  border-bottom: 0;
}

.work-specs__label {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 10px;
}

.work-specs__body {
  margin: 0;
}

.work-specs__body .section-body p {
  font-size: 15px;
  margin-bottom: 6px;
}

.work-specs__body .section-body ul {
  margin: 0;
  gap: 4px;
}

.work-specs__body .section-body li {
  font-size: 15px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Product detail: section body ---------- */

.section-body {
  color: var(--ink-dim);
}

.section-body p {
  margin-bottom: 12px;
}

.section-body p:last-child { margin-bottom: 0; }

.section-body ul {
  list-style: none;
  padding-left: 0;
  margin: 12px 0;
}

.section-body li {
  padding-left: 14px;
  position: relative;
}

.section-body li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--ember);
}

.section-body a {
  color: var(--ember);
  text-decoration: none;
  border-bottom: 1px solid var(--ember-dim);
}

.section-body a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
