/* 20-grid — the catalog: category rail + the spec-card grid (the shop's signature).
   Each product is a "cut sheet": a mono part-number header, the object on a framed plate
   with faint registration ticks, then name / tagline / price-as-line-item. */

/* category rail */
.rail { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.rail button {
  font-family: var(--mono); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.05em;
  border: 1.5px solid var(--line); background: var(--label); color: var(--muted);
  border-radius: 2px; padding: 8px 13px; cursor: pointer; display: inline-flex; gap: 7px; align-items: center;
}
.rail button:hover { border-color: var(--accent); color: var(--accent); }
.rail button.on { border-color: var(--ink); color: var(--ink); background: var(--paper); }
.rail button .n { color: var(--muted); font-weight: 400; }

/* grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid.wide-first .card:first-child { grid-column: 1 / -1; }

/* spec card */
.card {
  background: var(--label); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden;
  transition: border-color .14s, box-shadow .14s, transform .08s;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow-lift); transform: translateY(-2px); }

.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; color: var(--muted);
}
.card-sku { color: var(--ink); font-weight: 600; }
.card-kind { text-transform: uppercase; }

/* the plate: image framed with corner registration ticks */
.plate { position: relative; aspect-ratio: 4 / 3; background: var(--paper); }
.plate a { display: block; width: 100%; height: 100%; }
.plate img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.plate::before, .plate::after {
  content: ""; position: absolute; width: 12px; height: 12px; pointer-events: none; opacity: .5;
}
.plate::before { left: 8px; top: 8px; border-left: 1.5px solid var(--ink); border-top: 1.5px solid var(--ink); }
.plate::after { right: 8px; bottom: 8px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }

.card-body { padding: 14px 15px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 1.12rem; font-weight: 800; line-height: 1.15; }
.card-body h3 a { text-decoration: none; }
.card-body h3 a:hover { color: var(--accent); }
.card-tag { color: var(--muted); font-size: 0.92rem; line-height: 1.4; margin: 0; }

/* price shown as a drawing line-item with a dotted leader */
.priceline { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 10px; }
.priceline .lead { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-4px); }
.priceline .amt { font-family: var(--mono); font-weight: 600; font-size: 1.1rem; color: var(--ink); }
.priceline .amt .cur { color: var(--muted); font-size: 0.8em; }

.card-foot { display: flex; gap: 8px; padding: 0 15px 15px; }
.card-foot .btn { flex: 1; }

.stockflag { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; }
.stockflag.low { color: var(--warn); }
.stockflag.out { color: var(--muted); }

/* featured (controller) card: horizontal split on wide screens */
.card.feature { }
@media (min-width: 760px) {
  .card.feature { flex-direction: row; }
  .card.feature .plate { width: 42%; aspect-ratio: auto; border-right: 1px solid var(--line); }
  .card.feature .feature-side { flex: 1; display: flex; flex-direction: column; }
  .card.feature .card-head { border-bottom: 1px solid var(--line); }
  .card.feature .card-body { padding: 22px 24px; gap: 12px; }
  .card.feature .card-body h3 { font-size: 1.7rem; }
  .card.feature .card-tag { font-size: 1rem; }
  .card.feature .card-foot { padding: 0 24px 22px; max-width: 360px; }
  .card.feature .badge-life {
    align-self: flex-start; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent);
    border-radius: 2px; padding: 3px 8px;
  }
}

@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
