/* Store. Uses the theme's colours when it defines them, Bootstrap's otherwise. */
.st {
  --st-surface: var(--surface, var(--bs-tertiary-bg));
  --st-border: var(--border, var(--bs-border-color));
  --st-text: var(--text, var(--bs-body-color));
  --st-muted: var(--text-muted, var(--bs-secondary-color));
  --st-accent: var(--accent, var(--bs-primary));
}
.st-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.st-kicker {
  display: flex; align-items: center; gap: 12px; margin: 0 0 6px; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--st-accent);
}
.st-kicker::after { content: ""; width: 56px; height: 1px; background: var(--st-border); }
.st-header h1 { margin: 0 0 6px; text-transform: uppercase; letter-spacing: 0.02em; }
.st-header p { margin: 0; color: var(--st-muted); font-size: 0.9rem; }
.st-cart-button { display: inline-flex; align-items: center; gap: 8px; }
.st-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.5em; height: 1.5em; padding: 0 0.4em;
  border-radius: 999px; font-size: 0.72rem; font-weight: 800; line-height: 1;
  background: var(--st-text); color: var(--st-surface);
}
.st-muted { color: var(--st-muted); font-size: 0.85rem; }
.st-sub { display: block; font-size: 0.78rem; color: var(--st-muted); }
.st-num { text-align: right; white-space: nowrap; }

/* The game switch */
.st-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.st-tab {
  display: flex; align-items: center; gap: 10px; flex: 0 1 auto; min-width: 150px; padding: 9px 16px; text-decoration: none;
  color: var(--st-text); background: var(--st-surface); border: 1px solid var(--st-border); border-radius: 10px;
}
.st-tab:hover { border-color: var(--st-accent); color: var(--st-text); }
.st-tab.is-active { border-color: var(--st-accent); background: color-mix(in srgb, var(--st-accent) 12%, var(--st-surface)); box-shadow: inset 0 -2px 0 var(--st-accent); }
.st-tab > .bi { font-size: 1.15rem; color: var(--st-accent); }
.st-tab > span:not(.st-count) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.st-tab strong { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-tab small { color: var(--st-muted); font-size: 0.76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-tab .st-count { background: var(--st-accent); color: #fff; }

.st-chips-unused { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.st-chips a {
  padding: 5px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; text-decoration: none;
  color: var(--st-muted); border: 1px solid var(--st-border); background: var(--st-surface);
}
.st-chips a:hover { color: var(--st-text); border-color: var(--st-accent); }

/* Packages */
.st-section { margin-bottom: 26px; scroll-margin-top: 90px; }
.st-section-title { display: flex; align-items: baseline; gap: 10px; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--st-border); }
.st-section-title small { font-size: 0.72rem; color: var(--st-muted); letter-spacing: 0; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.st-card { display: flex; flex-direction: column; overflow: hidden; background: var(--st-surface); border: 1px solid var(--st-border); border-radius: 10px; }
.st-card:hover { border-color: var(--st-accent); }
.st-card-image, .st-package-image {
  position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3;
  background: color-mix(in srgb, var(--st-accent) 10%, var(--st-surface)); color: var(--st-accent); font-size: 2.6rem; text-decoration: none;
}
.st-card-image img, .st-package-image img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform 0.15s ease; }
.st-card:hover .st-card-image img { transform: scale(1.05); }
.st-badge {
  position: absolute; top: 10px; left: 10px; padding: 2px 8px; border-radius: 4px; font-size: 0.66rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.1em; background: var(--st-accent); color: #fff;
}
.st-card-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 12px 14px 14px; }
.st-card-body h3 { margin: 0; font-size: 0.95rem; font-weight: 800; overflow-wrap: anywhere; }
.st-card-body h3 a { color: var(--st-text); text-decoration: none; }
.st-card-body h3 a:hover { color: var(--st-accent); }
.st-card-summary { margin: 0; font-size: 0.84rem; color: var(--st-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: auto 0 0; color: var(--st-text); }
.st-price strong { font-size: 1.1rem; }
.st-price s { color: var(--st-muted); font-size: 0.86rem; }
.st-price small { color: var(--st-muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; }
.st-price-lg strong { font-size: 1.6rem; color: var(--st-accent); }
.st-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.st-card-actions .btn-primary { flex: 1; white-space: nowrap; }

.st-empty { padding: 34px 20px; text-align: center; color: var(--st-muted); background: var(--st-surface); border: 1px solid var(--st-border); border-radius: 10px; }
.st-note { margin: 14px 0 0; font-size: 0.8rem; color: var(--st-muted); }
.st-note .bi { color: var(--st-accent); margin-right: 4px; }
.st-back { margin: 0 0 14px; font-size: 0.88rem; }
.st-back a { text-decoration: none; }

/* One package */
.st-package { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; padding: 22px; background: var(--st-surface); border: 1px solid var(--st-border); border-radius: 10px; }
.st-package-image { border-radius: 8px; align-self: start; font-size: 4rem; }
.st-package-body h2 { margin: 0 0 8px; overflow-wrap: anywhere; }
.st-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 18px; }
.st-buy input[type=number] { width: 84px; }
.st-description { color: var(--st-text); overflow-wrap: anywhere; border-top: 1px solid var(--st-border); padding-top: 16px; }
.st-description img { max-width: 100%; height: auto; border-radius: 6px; }
.st-description > :last-child { margin-bottom: 0; }
@media (max-width: 767.98px) { .st-package { grid-template-columns: 1fr; } }

/* Cart */
.st-cart { display: grid; grid-template-columns: minmax(0, 5fr) minmax(260px, 2fr); gap: 20px; align-items: start; }
@media (max-width: 991.98px) { .st-cart { grid-template-columns: 1fr; } }
.st-panel { background: var(--st-surface); border: 1px solid var(--st-border); border-radius: 10px; padding: 20px 22px; }
.st-panel-title { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 12px; }
.st-table { width: 100%; border-collapse: collapse; color: var(--st-text); }
.st-table th { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--st-muted); padding: 8px 10px; border-bottom: 1px solid var(--st-border); }
.st-table td { padding: 10px; border-bottom: 1px solid var(--st-border); vertical-align: middle; }
.st-table tbody tr:last-child td { border-bottom: 0; }
.st-qty { width: 76px; }
.st-cart-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.st-total { font-size: 1.8rem; font-weight: 800; margin: 0 0 4px; color: var(--st-accent); }
.st-summary form { margin-top: 14px; }

.st-status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; border: 1px solid var(--st-border); color: var(--st-muted); }
.st-status-completed { color: #3fb950; border-color: color-mix(in srgb, #3fb950 50%, transparent); }
.st-status-refunded { color: #d29922; border-color: color-mix(in srgb, #d29922 50%, transparent); }
.st-status-disputed { color: #f85149; border-color: color-mix(in srgb, #f85149 50%, transparent); }

/* Minecraft stores: who is buying */
.st-ask { max-width: 520px; margin: 30px auto; padding: 28px 26px; text-align: center; background: var(--st-surface); border: 1px solid var(--st-border); border-radius: 10px; }
.st-ask h2 { font-size: 1.15rem; margin: 0 0 6px; }
.st-ask-field {
  display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; padding: 4px 14px;
  border: 1px solid var(--st-border); border-radius: 8px; background: color-mix(in srgb, var(--st-text) 5%, transparent);
}
.st-ask-field:focus-within { border-color: var(--st-accent); }
.st-ask-field .bi { font-size: 1.3rem; color: var(--st-accent); }
.st-ask-field input { flex: 1; min-width: 0; padding: 10px 0; border: 0; outline: 0; background: transparent; color: var(--st-text); font-size: 1rem; }
.st-ask-field input::placeholder { color: var(--st-muted); }
.st-ask-error { margin: -4px 0 12px; font-size: 0.85rem; color: #f85149; text-align: left; }
.st-ask-switch { display: inline-flex; align-items: center; gap: 10px; margin: 18px 0 4px; padding-left: 0; }
.st-ask-switch .form-check-input { float: none; margin: 0; width: 2.6em; height: 1.4em; cursor: pointer; }
.st-ask-switch .form-check-label { cursor: pointer; font-weight: 600; color: var(--st-text); }
.st-player {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; padding: 10px 14px;
  background: var(--st-surface); border: 1px solid var(--st-border); border-radius: 10px;
}
.st-face {
  /* A skin is 64px wide; its face is the 8x8 square at 8,8 and the hat layer the one at 40,8. Shown 4.5 times larger. */
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 4px; image-rendering: pixelated; background-repeat: no-repeat;
  background-size: 288px auto; background-position: -180px -36px, -36px -36px;
}
.st-player > .bi { font-size: 1.6rem; color: var(--st-accent); }
.st-player > span:not(.st-status):not(.st-face) { display: flex; flex-direction: column; line-height: 1.2; margin-right: auto; min-width: 0; }
.st-player small { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--st-muted); }
.st-player strong { color: var(--st-text); overflow-wrap: anywhere; }
.st-reward { color: var(--st-accent); font-size: 0.85em; margin-right: 2px; }

/* Categories down the side */
.st-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; }
.st-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.st-side .st-player { margin-bottom: 0; }
.st-side .st-player .st-status { display: none; }
.st-cats { display: flex; flex-direction: column; gap: 2px; padding: 12px; background: var(--st-surface); border: 1px solid var(--st-border); border-radius: 10px; }
.st-side-title { margin: 2px 8px 8px; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--st-muted); }
.st-cats a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 7px;
  color: var(--st-text); text-decoration: none; font-size: 0.9rem; font-weight: 600; border-left: 2px solid transparent;
}
.st-cats a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-cats a small { color: var(--st-muted); font-size: 0.72rem; font-weight: 700; }
.st-cats a:hover { background: color-mix(in srgb, var(--st-text) 6%, transparent); color: var(--st-text); }
.st-cats a.is-active { background: color-mix(in srgb, var(--st-accent) 14%, transparent); border-left-color: var(--st-accent); }
.st-cats a.is-active small { color: var(--st-accent); }
.st-cats a.is-child { margin-left: 14px; font-weight: 500; font-size: 0.86rem; }
.st-side-note { margin: 0 4px; }
.st-main { min-width: 0; }
.st-main .st-section:last-child { margin-bottom: 0; }
.st-card-actions .btn-outline-secondary { flex: 0 0 auto; }
@media (max-width: 991.98px) {
  .st-layout { grid-template-columns: 1fr; }
  .st-side { position: static; }
  .st-cats { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .st-side-title { width: 100%; margin-bottom: 2px; }
  .st-cats a { border: 1px solid var(--st-border); border-radius: 999px; padding: 5px 12px; font-size: 0.8rem; }
  .st-cats a.is-active { border-color: var(--st-accent); }
  .st-cats a.is-child { margin-left: 0; }
  .st-side-note { order: 3; }
}
@media (max-width: 575.98px) { .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .st-card-actions .btn-primary { font-size: 0.75rem; } }

/* Coupons, gift cards and creator codes */
.st-codes { margin: 14px 0; padding: 12px 0; border-top: 1px solid var(--st-border); border-bottom: 1px solid var(--st-border); }
.st-codes .form-label { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--st-muted); margin-bottom: 8px; }
.st-summary .st-codes form { margin-top: 0; }
.st-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; padding: 6px 10px; border: 1px dashed var(--st-accent); border-radius: 6px; font-weight: 600; overflow-wrap: anywhere; }
.st-code .bi-tag { color: var(--st-accent); margin-right: 4px; }
.st-code .btn { color: var(--st-muted); }
.st-code-add { display: flex; gap: 8px; margin-bottom: 8px; }
.st-code-add input { min-width: 0; }
.st-review { text-align: left; }
.st-review h2 { text-align: center; }
.st-review > .st-muted:first-of-type { text-align: center; }
.st-review-codes { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.st-review-totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: baseline; margin: 16px 0; padding-top: 14px; border-top: 1px solid var(--st-border); }
.st-review-totals dt { font-weight: 600; color: var(--st-muted); }
.st-review-totals dd { margin: 0; text-align: right; }
.st-review-totals s { color: var(--st-muted); }

/* Package questions, gifts, Tebex sidebar modules */
.st-options { flex: 0 0 100%; }
.st-options > div { max-width: 420px; }
.st-options .form-label { font-weight: 600; margin-bottom: 4px; }
.st-warn { color: #d29922; }
.st-gift .form-check { margin: 2px 0 6px; }
.st-staff { margin-top: 16px; font-size: 0.8rem; color: var(--st-muted); }
.st-staff pre { margin: 8px 0 0; padding: 10px; white-space: pre-wrap; overflow-wrap: anywhere; background: color-mix(in srgb, var(--st-text) 6%, transparent); border-radius: 6px; color: var(--st-text); }
.st-module { padding: 14px 16px; background: var(--st-surface); border: 1px solid var(--st-border); border-radius: 10px; min-width: 0; }
.st-module .st-side-title { margin: 0 0 10px; }
.st-module-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.st-module-list li { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.st-module-list strong, .st-module-top strong { color: var(--st-text); overflow-wrap: anywhere; }
.st-module-list span { font-size: 0.78rem; color: var(--st-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-module-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; }
.st-module-top .bi { color: var(--st-accent); }
.st-module-top span:not(.st-status) { margin-left: auto; font-size: 0.82rem; color: var(--st-muted); }
.st-bar { height: 10px; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--st-text) 10%, transparent); }
.st-bar span { display: block; height: 100%; border-radius: 999px; background: var(--st-accent); }
.st-module-goal { display: flex; justify-content: space-between; gap: 10px; margin: 8px 0 0; font-size: 0.82rem; color: var(--st-muted); }
.st-module-goal strong { color: var(--st-text); }
.st-module-featured { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--st-text); }
.st-module-featured img { width: 48px; height: 48px; object-fit: contain; flex: 0 0 48px; }
.st-module-featured span { display: flex; flex-direction: column; min-width: 0; }
.st-module-featured small { color: var(--st-accent); font-weight: 700; }
.st-module-text { font-size: 0.86rem; color: var(--st-text); overflow-wrap: anywhere; }
.st-module-text > :last-child { margin-bottom: 0; }
.st-module-text img { max-width: 100%; height: auto; }
