/* ------------------------------------------------------------------
   PDX Apple Music Row shop panel (shop.js, wave 16). Same DG//OS look as
   the ATM (atm.css): near-black panel, chamfers, mono labels, volt for
   cash and the chosen row, hot for a refusal. No curves.
   Also: the card's gear slots (.pdx-card-slot [data-item]) get a cut-out
   shape instead of a plain square, so a guitar does not look like a drug.
   ------------------------------------------------------------------ */
.shop {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  padding: 8px; background: rgba(3, 4, 7, .78); overflow: auto; font-family: var(--font-mono);
}
.shop[hidden] { display: none; }
.shop-box {
  --c: 14px;
  width: min(480px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 14px;
  background: var(--panel); border: 1px solid var(--volt); color: var(--text);
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
}
.shop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.shop-title { min-width: 0; }
.shop-eyebrow { margin: 0 0 6px; font: 500 10px/1.3 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.shop-name { margin: 0; font: 700 24px/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.shop-close {
  flex: none; padding: 9px 11px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); cursor: pointer;
  font: 500 11px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; touch-action: manipulation;
}
.shop-close:hover { color: var(--volt); border-color: var(--volt); }
.shop-close kbd { margin-left: 4px; }
@media (pointer: coarse) { .shop-close kbd, .shop-keys { display: none; } }

.shop-cash { margin: 0; display: flex; align-items: baseline; justify-content: space-between; padding: 10px 12px; background: var(--screen); border: 1px solid var(--line-2); }
.shop-cash i { font: 500 10px/1 var(--font-mono); font-style: normal; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.shop-num { font: 700 26px/1 var(--font-display); letter-spacing: .03em; font-variant-numeric: tabular-nums; color: var(--volt); }

.shop-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.shop-tab {
  padding: 11px 8px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); cursor: pointer; touch-action: manipulation;
  font: 700 12px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
}
.shop-tab:hover { color: var(--text); }
.shop-tab.is-on { background: var(--volt); color: #000; border-color: var(--volt); }

.shop-list { display: flex; flex-direction: column; gap: 5px; }
.shop-row {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); cursor: pointer; text-align: left;
  font: 600 12px/1.2 var(--font-mono); touch-action: manipulation;
}
.shop-row:hover, .shop-row.is-sel { border-color: var(--volt); }
.shop-row.is-off { color: var(--muted); }
.shop-row.is-off .shop-price { color: var(--muted); }
.shop-sw { width: 30px; height: 30px; display: block; }
.shop-rn { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.shop-rn b { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.shop-rn em { font-style: normal; font-weight: 500; font-size: 10px; letter-spacing: .06em; color: var(--muted); overflow-wrap: anywhere; }
.shop-state { font: 700 10px/1 var(--font-mono); letter-spacing: .12em; color: var(--hot); }
.shop-price { font: 700 16px/1 var(--font-display); letter-spacing: .03em; font-variant-numeric: tabular-nums; color: var(--volt); min-width: 3.5em; text-align: right; }
.shop :focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; position: relative; z-index: 1; }

.shop-msg { margin: 0; min-height: 2.6em; padding: 7px 9px; font: 600 12px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; background: var(--bg-2); border-left: 3px solid var(--line-2); color: var(--muted); }
.shop-msg.is-ok { color: var(--volt); border-color: var(--volt); }
.shop-msg.is-bad { color: var(--hot); border-color: var(--hot); }
.shop-keys { margin: 0; font: 500 10px/1.5 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Gear on the card and in the panel: a silhouette cut from the swatch. */
.shop-sw[data-item="guitar"], .pdx-card-slot i[data-item="guitar"] { clip-path: polygon(62% 0, 78% 0, 78% 8%, 70% 8%, 70% 38%, 92% 55%, 92% 88%, 70% 100%, 30% 100%, 8% 88%, 8% 55%, 30% 38%, 62% 38%); }
.shop-sw[data-item="drums"], .pdx-card-slot i[data-item="drums"] { clip-path: polygon(12% 8%, 88% 8%, 88% 30%, 74% 100%, 26% 100%, 12% 30%); }
.shop-sw[data-item="violin"], .pdx-card-slot i[data-item="violin"] { clip-path: polygon(44% 0, 56% 0, 56% 30%, 80% 42%, 70% 62%, 86% 82%, 56% 100%, 44% 100%, 14% 82%, 30% 62%, 20% 42%, 44% 30%); }
.shop-sw[data-item="skateboard"], .pdx-card-slot i[data-item="skateboard"] { clip-path: polygon(0 20%, 100% 20%, 100% 52%, 88% 52%, 88% 80%, 70% 80%, 70% 52%, 30% 52%, 30% 80%, 12% 80%, 12% 52%, 0 52%); }
.shop-sw[data-item="bike"], .pdx-card-slot i[data-item="bike"] { clip-path: polygon(0 40%, 25% 40%, 35% 55%, 70% 55%, 80% 40%, 100% 40%, 100% 100%, 75% 100%, 75% 75%, 25% 75%, 25% 100%, 0 100%); }

@media (max-width: 420px) {
  .shop-box { padding: 14px 12px 12px; gap: 10px; }
  .shop-row { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; }
  .shop-state { display: none; }
}
