/* Blue Wave Baseball - the generic shop (shop.js): one panel for every
   seller in Willemstad. Compact tiles with a rarity edge, and a detail strip
   for the picked item. Colours follow career.css (navy panels, aqua lines,
   yellow accents); rarity colours follow the store chips. */

.sh-shop {
  --sh-line: rgba(67, 177, 230, 0.42);
  --sh-inset: rgba(1, 29, 58, 0.66);
  --sh-dim: rgba(255, 255, 255, 0.66);
  --edge-common: #9fb2c2;
  --edge-rare: #4f9dff;
  --edge-epic: #a66cff;
  --edge-legendary: #ff8a28;
  --edge-skin: #20b4c8;
  --edge-pack: #f3c744;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.85rem;
  color: #fffaf0;
}

.sh-tabs {
  display: flex;
  gap: 0.35rem;
}

.sh-tabs button {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--sh-line);
  border-radius: 999px;
  background: var(--sh-inset);
  color: rgba(255, 255, 255, 0.78);
  font: 700 0.78rem/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}

.sh-tabs button.active { background: #9ed8f7; border-color: #9ed8f7; color: #082b45; }
.sh-tabs button:focus-visible { outline: 2px solid #f3c744; outline-offset: 2px; }

/* ---- the grid ---------------------------------------------------- */

.sh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.6rem, 8.6rem));
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sh-tile {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
  padding: 0.4rem 0.4rem 0.5rem;
  border: 1px solid var(--sh-line);
  border-radius: 0.45rem;
  background: var(--sh-inset);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.sh-tile:hover { transform: translateY(-1px); border-color: rgba(243, 199, 68, 0.6); }
.sh-tile:focus-visible { outline: 2px solid #f3c744; outline-offset: 2px; }
.sh-tile.picked { border-color: #f3c744; background: rgba(6, 74, 115, 0.72); box-shadow: 0 0 0 1px #f3c744 inset; }

.sh-art {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid var(--edge, var(--sh-line));
  border-radius: 0.35rem;
  background: radial-gradient(circle at 50% 35%, rgba(158, 216, 247, 0.22), rgba(1, 29, 58, 0.9) 70%);
}

.sh-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.edge-skin .sh-art img,
.sh-detail-art.edge-skin img { object-fit: cover; object-position: 50% 18%; }

.edge-common { --edge: var(--edge-common); }
.edge-rare { --edge: var(--edge-rare); }
.edge-epic { --edge: var(--edge-epic); }
.edge-legendary { --edge: var(--edge-legendary); }
.edge-skin { --edge: var(--edge-skin); }
.edge-skin.skin-common { --edge: var(--edge-common); }
.edge-skin.skin-rare { --edge: var(--edge-rare); }
.edge-skin.skin-epic { --edge: var(--edge-epic); }
.edge-skin.skin-legendary { --edge: var(--edge-legendary); }
.edge-pack { --edge: var(--edge-pack); }

.sh-owned {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  min-width: 1.3rem;
  padding: 0.12rem 0.3rem;
  border-radius: 999px;
  background: #298b68;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  text-align: center;
}

.sh-owned.saved { background: #f3c744; color: #082b45; }

.sh-boosts {
  position: absolute;
  left: 0.2rem;
  bottom: 0.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.sh-boost {
  padding: 0.08rem 0.28rem;
  border-radius: 0.25rem;
  background: rgba(2, 20, 36, 0.85);
  color: #f3c744;
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.sh-name {
  display: -webkit-box;
  min-height: 2.4em;
  overflow: hidden;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sh-price {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #f3c744;
  font-size: 0.74rem;
  font-weight: 900;
}

.sh-price i {
  display: grid;
  place-items: center;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: #f3c744;
  color: #082b45;
  font-size: 0.58rem;
  font-style: normal;
}

.sh-price.short { color: #ff9b8a; }
.sh-price.short i { background: #ff9b8a; }
.sh-price.owned { color: #7fd1a8; }

/* ---- the detail strip -------------------------------------------- */

.sh-detail {
  display: grid;
  grid-template-columns: 5.6rem minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid rgba(243, 199, 68, 0.55);
  border-radius: 0.5rem;
  background: linear-gradient(135deg, rgba(6, 74, 115, 0.55), rgba(1, 29, 58, 0.8));
}

.sh-detail-art {
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid var(--edge, var(--sh-line));
  border-radius: 0.4rem;
  background: radial-gradient(circle at 50% 35%, rgba(158, 216, 247, 0.25), rgba(1, 29, 58, 0.9) 70%);
}

.sh-detail-art img { display: block; width: 100%; height: 100%; object-fit: contain; }

.sh-detail-info { min-width: 0; }
.sh-detail-info h4 {
  margin: 0.3rem 0 0.2rem;
  font: 800 1.12rem/1.15 "Playfair Display", Georgia, serif;
}

.sh-does { margin: 0; color: #fffaf0; font-size: 0.8rem; line-height: 1.35; }
.sh-does b { color: #f3c744; }
.sh-meta { margin: 0.25rem 0 0; color: var(--sh-dim); font-size: 0.7rem; line-height: 1.35; }
.sh-meta b { color: #f3c744; }
.sh-warn { margin: 0.3rem 0 0; color: #ffb4a6; font-size: 0.72rem; font-weight: 700; }

.sh-link {
  padding: 0;
  border: 0;
  background: none;
  color: #9ed8f7;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.sh-detail-act {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
  min-width: 10rem;
  text-align: center;
}

.sh-detail-act small { color: var(--sh-dim); font-size: 0.66rem; }

.sh-btn {
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 0.4rem;
  background: #f3c744;
  color: #082b45;
  font: 900 0.84rem/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.sh-btn:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.sh-btn:focus-visible { outline: 2px solid #fffaf0; outline-offset: 2px; }
.sh-btn.is-confirm { background: #e85f4b; color: #fff; }
.sh-btn.is-open, .sh-btn.is-saved { background: linear-gradient(90deg, #f3c744, #ffdd6e); }
.sh-btn:disabled { background: rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.6); cursor: default; }
.sh-btn.ghost { background: transparent; border: 1px solid #f3c744; color: #f3c744; }

.sh-foot {
  margin: 0;
  color: var(--sh-dim);
  font-size: 0.7rem;
  text-align: center;
}

.sh-empty {
  display: grid;
  place-items: center;
  gap: 0.6rem;
  min-height: 10rem;
  color: var(--sh-dim, rgba(255, 255, 255, 0.66));
}

@media (max-width: 620px) {
  .sh-detail { grid-template-columns: 4.2rem minmax(0, 1fr); }
  .sh-detail-act { grid-column: 1 / -1; min-width: 0; }
  .sh-grid { grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .sh-tile, .sh-btn { transition: none; }
}

/* ---- food (M4b: the pastechi) ------------------------------------ */

.sh-shop { --edge-food: #e8a947; }
.edge-food { --edge: var(--edge-food, #e8a947); }
.shop-chip.chip-food { background: #e8a947; color: #2b1300; }

/* The daily gift row: three on the house, once a day. */
.sh-daily {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(232, 169, 71, 0.7);
  border-radius: 0.5rem;
  background: linear-gradient(90deg, rgba(232, 169, 71, 0.22), rgba(1, 29, 58, 0.7) 70%);
}

.sh-daily-art {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid #e8a947;
  border-radius: 0.4rem;
}

.sh-daily-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sh-daily small { display: block; color: #f3c744; font-size: 0.6rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.sh-daily strong { display: block; font-size: 0.95rem; line-height: 1.2; }
.sh-daily em { display: block; color: var(--sh-dim); font-size: 0.68rem; font-style: normal; line-height: 1.3; }
.sh-daily .sh-btn { min-width: 8.5rem; }
.sh-daily-note { color: var(--sh-dim); font-size: 0.74rem; font-weight: 700; text-align: right; }
.sh-daily-note.done { color: #7fd1a8; }

/* How many: − 2 + */
.sh-qty {
  display: grid;
  grid-template-columns: 2.2rem 1fr 2.2rem;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--sh-line);
  border-radius: 0.4rem;
  background: var(--sh-inset);
}

.sh-qty button {
  height: 2.1rem;
  border: 0;
  background: rgba(158, 216, 247, 0.12);
  color: #fffaf0;
  font: 800 1.05rem/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}

.sh-qty button:disabled { color: rgba(255, 255, 255, 0.3); cursor: default; }
.sh-qty button:focus-visible { outline: 2px solid #f3c744; outline-offset: -2px; }
.sh-qty b { font-size: 0.95rem; text-align: center; }
.sh-fed { color: #7fd1a8 !important; font-weight: 700; }

@media (max-width: 620px) {
  .sh-daily { grid-template-columns: 2.8rem minmax(0, 1fr); }
  .sh-daily > :last-child { grid-column: 1 / -1; }
}

/* A requirement the shop asks before it sells (PvP winnings) */
.sh-req { margin: 0.3rem 0 0; color: #ffd98a; font-size: 0.72rem; line-height: 1.35; }
.sh-req b { color: #fff; }
.sh-req.met { color: #9fe2b0; }
.sh-lock { font-style: normal; font-size: 0.7em; }
.sh-btn.is-locked, .sh-btn.is-foodfull { opacity: 0.7; }
