/* 5 · Stock Board: a dark split-flap board. Status words sit on flap tiles with a hinge line,
   rows flip in one after another, and the compare view lays editions side by side like a spec
   sheet. A yellow tray at the bottom holds the products ticked to compare. */
.spc--board { --spc-bg: #14161A; --spc-fg: #F2F2EE; --spc-muted: #9EA3AB; --spc-line: rgba(255, 255, 255, 0.14); --spc-card: #1D2026; --spc-accent: #FFD23F; --spc-accent-fg: #14161A; --brd-flap: #0B0C0E; }
.brd { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--spc-bg); }
.brd__head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #0B0C0E; border-bottom: 3px solid var(--spc-accent); }
.brd__title { flex: 1; min-width: 0; font: 700 13px/1.2 var(--body-font); letter-spacing: 1.5px; text-transform: uppercase; color: var(--spc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brd__title b { margin-right: 8px; padding: 3px 8px; border-radius: 4px; background: var(--spc-accent); color: var(--spc-accent-fg); }
.brd__clock { font: 700 18px/1 ui-monospace, Menlo, monospace; color: var(--spc-accent); font-variant-numeric: tabular-nums; }
.brd__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.08); cursor: pointer; font-weight: 700; font-size: 13px; }
.brd__btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16); }
.brd__btn:disabled { opacity: 0.4; cursor: default; }
.brd__view { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px 70px; overscroll-behavior: contain; }
.brd__view[hidden] { display: none; }

.brd__filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.brd__status { display: flex; flex-wrap: wrap; gap: 4px; }
.brd__chip { min-height: 36px; padding: 4px 10px; border: 0; border-radius: 6px; background: rgba(255, 255, 255, 0.07); cursor: pointer; font: 700 12px/1 var(--body-font); letter-spacing: 0.5px; text-transform: uppercase; }
.brd__chip small { margin-left: 4px; opacity: 0.6; }
.brd__chip[aria-pressed='true'] { background: var(--spc-accent); color: var(--spc-accent-fg); }
.brd__field { display: flex; flex-direction: column; gap: 2px; font: 700 10px/1 var(--body-font); letter-spacing: 1px; text-transform: uppercase; color: var(--spc-muted); }
.brd__field select, .brd__field input { min-height: 36px; padding: 4px 10px; border: 0; border-radius: 6px; background: #262A31; color: var(--spc-fg); font: 500 13px/1 var(--body-font); text-transform: none; letter-spacing: 0; }
.brd__field--q { flex: 1; min-width: 140px; }

.brd__table { width: 100%; margin: 10px 0; border-collapse: separate; border-spacing: 0 4px; }
.brd__table th { padding: 4px 8px; text-align: left; font: 700 10px/1 var(--body-font); letter-spacing: 1.4px; text-transform: uppercase; color: var(--spc-muted); }
.brd-row td { padding: 6px 8px; background: var(--spc-card); vertical-align: middle; }
.brd-row td:first-child { border-radius: 8px 0 0 8px; width: 44px; text-align: center; }
.brd-row td:last-child { border-radius: 0 8px 8px 0; }
.brd-row { animation: brdFlip 0.35s ease both; animation-delay: calc(var(--i, 0) * 35ms); transform-origin: 50% 0; }
@keyframes brdFlip { from { transform: perspective(600px) rotateX(-80deg); opacity: 0; } }
.brd-cmp { width: 22px; height: 22px; accent-color: var(--spc-accent); cursor: pointer; }
.brd-open { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; font-weight: 600; }
.brd-open img, .brd-open .spc-nophoto { width: 44px; height: 44px; flex: none; border-radius: 6px; object-fit: cover; background: #fff; }
.brd-open:hover .brd-open__name { text-decoration: underline; }
.brd-row__line { color: var(--spc-muted); font-size: 13px; }
.brd-row__price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.brd-row__st small { display: block; margin-top: 2px; color: var(--spc-muted); font-size: 11px; }
.brd-flap {
  display: inline-block; padding: 4px 8px; border-radius: 4px; font: 700 12px/1 ui-monospace, Menlo, monospace; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap;
  background: linear-gradient(180deg, var(--brd-flap) 0 49%, #000 49% 51%, var(--brd-flap) 51%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.brd-flap--in { color: #7DFFB0; }
.brd-flap--pre { color: #FFD23F; }
.brd-flap--sale { color: #FF7A7A; }
.brd-flap--out { color: #8A8F98; text-decoration: line-through; }
.brd__pager { display: flex; align-items: center; justify-content: center; gap: 10px; }
.brd__pager[hidden] { display: none; }

.brd__tray {
  position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px;
  background: var(--spc-accent); color: var(--spc-accent-fg); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4); animation: brdTray 0.2s ease;
}
.brd__tray[hidden] { display: none; }
@keyframes brdTray { from { transform: translateY(20px); opacity: 0; } }
.brd__tray-list { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; font-size: 13px; }
.brd__tag { display: inline-flex; align-items: center; gap: 4px; max-width: 220px; min-height: 32px; padding: 2px 10px; border: 0; border-radius: 999px; background: rgba(0, 0, 0, 0.12); cursor: pointer; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brd__go { background: var(--spc-accent-fg); color: var(--spc-accent); }

/* spec sheet, compare, cart */
.brd__back { margin-bottom: 8px; }
.brd-sheet { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 20px; }
.brd-sheet__photo > img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 10px; background: #fff; }
.brd-sheet__thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.brd-sheet__thumbs button { width: 48px; height: 48px; padding: 0; border: 0; border-radius: 6px; overflow: hidden; cursor: pointer; background: #fff; }
.brd-sheet__thumbs button[aria-pressed='true'] { box-shadow: 0 0 0 3px var(--spc-accent); }
.brd-sheet__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.brd-sheet__more { display: flex; align-items: center; gap: 8px; }
.brd-spec { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 8px 0 12px; padding: 10px 0; border-block: 1px solid var(--spc-line); }
.brd-spec dt { font: 700 10px/1.8 var(--body-font); letter-spacing: 1.4px; text-transform: uppercase; color: var(--spc-muted); }
.brd-spec dd { margin: 0; }
.brd-cols { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(200px, 1fr)); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.brd-col { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; background: var(--spc-card); scroll-snap-align: start; }
.brd-col h4 { margin: 0; font: 700 15px/1.25 var(--body-font); }
.brd-col__photo { display: block; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #fff; }
.brd-col__photo img { width: 100%; height: 100%; object-fit: contain; }
.brd-col .spc-btn { margin-top: auto; }
.brd-eds { margin: 0; padding-left: 16px; }
.brd-eds .is-out { color: var(--spc-muted); text-decoration: line-through; }
.spc--board .spc-chip input:checked + span { background: var(--spc-accent); color: var(--spc-accent-fg); }
.spc--board .spc-confirm { color: #3B2C05; }
.spc--board .spc-line img { background: #fff; }

@container pc (max-width: 640px) {
  .brd__table thead { display: none; }
  .brd__table, .brd__table tbody { display: block; }
  .brd-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: 'cmp name name' 'cmp price st'; margin-bottom: 6px; border-radius: 8px; overflow: hidden; background: var(--spc-card); }
  .brd-row td { display: block; background: none; border-radius: 0 !important; }
  .brd-row__cmp { grid-area: cmp; align-self: center; }
  .brd-row__name { grid-area: name; }
  .brd-row__line { display: none !important; }
  .brd-row__price { grid-area: price; }
  .brd-row__st { grid-area: st; text-align: right; }
  .brd-sheet { grid-template-columns: minmax(0, 1fr); }
  .brd-cols { grid-template-columns: repeat(var(--n, 2), minmax(78%, 1fr)); }
  .brd__clock { display: none; }
}
@media (prefers-reduced-motion: reduce) { .brd-row, .brd__tray { animation: none; } }
