/* ============================================================================
   Shop
   ----------------------------------------------------------------------------
   Someone to buy from, and goods laid out as priced tiles. The old version
   was a list of rows where the price was a sentence; here the price IS the
   button and wears the currency's own painted coin.

   Depends on tokens.css and kit.css.
   ========================================================================== */

.sh { padding: 0 var(--s3) var(--s6); }

/* --- the quartermaster ------------------------------------------------------ */

.sh-keeper {
  position: relative;
  height: 162px;
  margin: 0 calc(var(--s3) * -1) var(--s3);
  padding: var(--s3);
  background-size: cover;
  background-position: center 40%;
  box-shadow: inset 0 -50px 50px -14px rgba(5, 7, 13, 0.92);
}

.sh-keeper-art {
  position: absolute;
  left: var(--s3);
  bottom: 0;
  height: 152px;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.7));
}

/* A speech plate rather than a caption: it is a person talking. */
.sh-bubble {
  position: absolute;
  left: 118px;
  right: var(--s3);
  top: var(--s3);
  padding: var(--s2) var(--s3);
  border-radius: var(--rad-md);
  background: rgba(10, 13, 20, 0.86);
  box-shadow: var(--bevel), var(--cast-sm);
}
.sh-bubble::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 18px;
  border: 7px solid transparent;
  border-right-color: rgba(10, 13, 20, 0.86);
  border-left: 0;
}
.sh-bubble-who {
  font-family: var(--font-display);
  font-size: var(--fz-small);
  color: var(--gold-200);
}
.sh-bubble-line {
  margin: 2px 0 0;
  font-size: var(--fz-small);
  line-height: 1.35;
  color: var(--text-muted);
}

.sh-reset {
  position: absolute;
  right: var(--s3);
  bottom: var(--s2);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: var(--rad-pill);
  background: rgba(6, 8, 14, 0.8);
  font-size: var(--fz-tiny);
  color: var(--text-dim);
}

/* --- tabs -------------------------------------------------------------------- */

.sh-tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  margin-bottom: var(--s3);
  border-radius: var(--rad-pill);
  background: var(--panel-sunken);
  box-shadow: var(--carve);
}

.sh-tab {
  position: relative;
  flex: 1;
  min-height: 38px;
  border: 0;
  border-radius: var(--rad-pill);
  background: none;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: var(--fz-small);
  cursor: pointer;
}
.sh-tab::after { content: ''; position: absolute; inset: -5px 0; }
.sh-tab.is-on {
  color: var(--text-ink);
  background: linear-gradient(180deg, var(--gold-200), var(--gold-400));
  box-shadow: var(--bevel), 0 2px 0 var(--gold-800);
}

/* --- the goods ---------------------------------------------------------------- */

.sh-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s2);
}

.sh-item {
  position: relative;
  display: grid;
  gap: 4px;
  padding: var(--s2);
  border-radius: var(--rad-md);
  background: var(--panel-face);
  box-shadow: var(--bevel), var(--shelf-sm) var(--ink-800), var(--cast-sm);
  overflow: hidden;
}

.sh-item-face {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 78px;
  border-radius: var(--rad-sm);
  background: var(--panel-sunken);
  box-shadow: var(--carve);
}
.sh-item-face .portrait { width: 60px; }
.sh-item-icon { filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.6)); }

.sh-item-qty {
  position: absolute;
  right: 5px;
  bottom: 4px;
  padding: 0 6px;
  border-radius: var(--rad-pill);
  background: rgba(6, 8, 14, 0.85);
  font-size: var(--fz-tiny);
  color: var(--text-muted);
}

.sh-item-name {
  font-size: var(--fz-small);
  line-height: 1.2;
  color: var(--text-cream);
  min-height: 2.4em;
}
.sh-item-limit { font-size: var(--fz-tiny); color: var(--text-dim); }

/* The price is the control. */
.sh-price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  border: 2px solid var(--gold-800);
  border-radius: var(--rad-sm);
  background: linear-gradient(180deg, var(--gold-200), var(--gold-400));
  color: var(--text-ink);
  font-family: var(--font-num);
  font-weight: 700;
  font-size: var(--fz-small);
  cursor: pointer;
  box-shadow: var(--bevel), 0 3px 0 var(--gold-800);
}
.sh-price:active { transform: translateY(2px); box-shadow: var(--bevel), 0 1px 0 var(--gold-800); }

.sh-price.is-short {
  border-color: var(--iron-500);
  background: linear-gradient(180deg, var(--ink-500), var(--ink-700));
  color: var(--text-dim);
  box-shadow: var(--bevel), 0 3px 0 var(--ink-900);
}
.sh-price.is-locked,
.sh-price.is-sold {
  border: 0;
  background: var(--panel-sunken);
  box-shadow: var(--carve);
  color: var(--text-dim);
  cursor: default;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fz-tiny);
  text-align: center;
  padding: 0 var(--s2);
}

/* Sold out is stamped across the tile, not hidden in the button. */
.sh-item.is-sold { opacity: 0.55; }
.sh-sold-stamp {
  position: absolute;
  top: 38%;
  left: -12%;
  right: -12%;
  padding: 3px 0;
  rotate: -9deg;
  text-align: center;
  font-family: var(--font-display);
  font-size: var(--fz-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(150, 30, 24, 0.86);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.kit-ribbon.tone-warn { background: linear-gradient(180deg, var(--warn), var(--warn-deep)); color: #2a1a02; }

.sh-blurb { margin: var(--s3) 0 0; font-size: var(--fz-small); color: var(--text-dim); }
.sh-empty { padding: var(--s12) 0; text-align: center; color: var(--text-dim); }
