/* TECHTRONICS. One family (Saira) whose width axis carries the personality: condensed and heavy
   for titles and prices, normal width for reading. Every colour means one thing:
   sticker yellow = price or main action, red = sale, green = WhatsApp. */

@font-face {
  font-family: "Saira";
  src: url("/static/fonts/saira-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0a1a4f;
  --deck: #11256b;
  --deck-2: #183186;
  --line: #2a43a0;
  --line-2: #3b57c4;
  --paper: #f2f5ff;
  --mist: #a9b6e6;
  --dim: #7182c2;
  --sticker: #ffd23f;
  --sticker-ink: #1b1500;
  --sale: #ff4d4d;
  --wa: #25d366;
  --wa-ink: #04220f;
  --ps4: #2f6bff;
  --ok: #4ade80;
  --radius: 6px;
  --wrap: 1200px;
  --gutter: 16px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "Saira", system-ui, sans-serif;
  font-size: 1rem;
  font-stretch: 100%;
  line-height: 1.55;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

p {
  margin: 0 0 0.75em;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--sticker);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow {
  max-width: 720px;
}

.muted {
  color: var(--mist);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--sticker);
  color: var(--sticker-ink);
  padding: 0.5em 1em;
  border-radius: var(--radius);
}

.skip:focus {
  left: 8px;
}

/* ---------- header and footer ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.site-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}

.wordmark {
  font-weight: 900;
  font-stretch: 55%;
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  color: var(--paper);
  white-space: nowrap;
}

.wordmark-sm {
  font-size: 1.3rem;
  margin-bottom: 0.4em;
}

.wordmark-tag {
  font-weight: 600;
  font-stretch: 85%;
  font-size: 0.85rem;
  letter-spacing: 0;
  color: var(--mist);
  margin-left: 0.3em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 600;
  font-stretch: 88%;
}

.site-nav a {
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--sticker);
}

.site-nav a:first-child {
  display: none;
}

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.6em;
  height: 1.6em;
  padding: 0 0.35em;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 0.85rem;
  font-weight: 700;
}

.cart-count.has-items {
  background: var(--sticker);
  border-color: var(--sticker);
  color: var(--sticker-ink);
}

.cart-count.bump {
  animation: bump 0.35s ease-out;
}

@keyframes bump {
  40% {
    transform: scale(1.35) rotate(-8deg);
  }
}

.site-foot {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 5.5rem;
}

.foot-grid {
  display: grid;
  gap: 1.5rem;
}

.foot-h {
  font-size: 1rem;
  font-weight: 700;
  font-stretch: 80%;
  margin-bottom: 0.5em;
}

.foot-grid a {
  color: var(--paper);
}

.foot-small {
  margin-top: 1.5rem;
  font-size: 0.85rem;
}

.wa-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wa);
  color: var(--wa-ink);
}

.wa-icon {
  width: 1.4em;
  height: 1.4em;
  flex: none;
}

.wa-float .wa-icon {
  width: 30px;
  height: 30px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  z-index: 40;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 32px);
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 0.75em 1em;
  background: var(--deck-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  font-weight: 500;
}

.toast-link {
  color: var(--sticker);
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 46px;
  padding: 0.6em 1.25em;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  font-stretch: 85%;
  font-size: 1.02rem;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.1;
}

.btn:disabled,
.btn-primary:disabled {
  cursor: not-allowed;
  background: transparent;
  border-color: var(--line);
  color: var(--dim);
}

.btn-primary {
  background: var(--sticker);
  color: var(--sticker-ink);
}

.btn-primary:hover:not(:disabled) {
  background: #ffdf70;
}

.btn-ghost {
  border-color: var(--paper);
  color: var(--paper);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--sticker);
  color: var(--sticker);
}

.btn-wa {
  background: var(--wa);
  color: var(--wa-ink);
}

.btn-wa:hover {
  background: #4be287;
}

.btn-danger {
  background: transparent;
  border-color: var(--sale);
  color: var(--sale);
}

.btn-small {
  min-height: 36px;
  padding: 0.35em 0.85em;
  font-size: 0.92rem;
}

.btn-block {
  width: 100%;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--mist);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-weight: 500;
}

.link-button:hover {
  color: var(--paper);
}

.inline-form {
  display: inline;
  margin: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- the game case: platform band, 3:4 cover, price sticker ---------- */

.case {
  position: relative;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
  border-radius: 5px;
  overflow: visible;
  background: var(--deck);
  outline: 1px solid rgba(242, 245, 255, 0.1);
}

.case-band {
  display: flex;
  align-items: center;
  height: 11cqi;
  min-height: 18px;
  padding-inline: 5cqi;
  border-radius: 5px 5px 0 0;
  font-weight: 800;
  font-stretch: 70%;
  font-size: max(11px, 6.5cqi);
  letter-spacing: 0.04em;
}

.case-ps5 .case-band {
  background: var(--paper);
  color: var(--ink);
}

.case-ps4 .case-band {
  background: var(--ps4);
  color: #fff;
}

.case-art {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 0 0 5px 5px;
}

.case-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-type {
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 100%;
  padding: 7cqi 7cqi 9cqi;
}

.case-type-title {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 800;
  font-stretch: 58%;
  font-size: 15cqi;
  line-height: 0.95;
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
}

.tone-0 {
  background: #1b3a9e;
}
.tone-1 {
  background: #0e5e6f;
}
.tone-2 {
  background: #4a1f7a;
}
.tone-3 {
  background: #7a1f3d;
}
.tone-4 {
  background: #1f4f2e;
}

.sticker {
  position: absolute;
  top: 15cqi;
  right: -5cqi;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  width: 38cqi;
  height: 38cqi;
  border-radius: 50%;
  background: var(--sticker);
  color: var(--sticker-ink);
  transform: rotate(-9deg);
  text-align: center;
  line-height: 0.95;
  box-shadow: 0 0 0 2px var(--ink);
}

.sticker-price {
  font-weight: 800;
  font-stretch: 62%;
  font-size: 11cqi;
  letter-spacing: -0.01em;
}

.sticker-small {
  font-weight: 700;
  font-stretch: 80%;
  font-size: 6cqi;
}

.sticker-was {
  font-weight: 600;
  font-stretch: 75%;
  font-size: 6cqi;
  opacity: 0.85;
}

.sticker-sale {
  background: var(--sale);
  color: #fff;
}

/* The big cover on a game page fills the phone's width, so its sticker stays inside the edge. */
.case-large .sticker {
  right: 3cqi;
}

/* Shelf cases are small; badges there would sit on top of the sticker. */
.shelf .badges {
  display: none;
}

.sticker-soldout {
  background: var(--deck-2);
  color: var(--mist);
  font-weight: 700;
  font-stretch: 70%;
  font-size: 7.5cqi;
  border: 1px solid var(--line-2);
}

.badges {
  position: absolute;
  top: 14cqi;
  left: 4cqi;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.badge {
  display: inline-block;
  padding: 0.15em 0.5em;
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  font-stretch: 80%;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-hot {
  background: var(--sale);
  color: #fff;
}

/* ---------- hero ---------- */

.hero {
  padding: 2.25rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  gap: 2rem;
}

.hero-title {
  font-weight: 800;
  font-stretch: 60%;
  font-size: clamp(2.9rem, 13vw, 5.6rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
  margin-bottom: 0.35em;
  max-width: 11ch;
}

.lede {
  color: var(--mist);
  font-size: 1.08rem;
  max-width: 38ch;
  margin-bottom: 1.4em;
}

.shelf {
  list-style: none;
  margin: 0;
  padding: 0 0 14px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  position: relative;
  background: linear-gradient(to top, var(--deck) 0 10px, var(--line-2) 10px 12px, transparent 12px);
  padding-right: 10px;
}

.shelf::-webkit-scrollbar {
  display: none;
}

.shelf-item {
  flex: 0 0 42%;
}

.shelf-item a {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* The one orchestrated moment: cases settle onto the shelf, then their stickers go on. */
@media (prefers-reduced-motion: no-preference) {
  .shelf-item {
    animation: settle 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .shelf-item:nth-child(2) {
    animation-delay: 0.07s;
  }
  .shelf-item:nth-child(3) {
    animation-delay: 0.14s;
  }
  .shelf-item:nth-child(4) {
    animation-delay: 0.21s;
  }
  .shelf-item .sticker {
    animation: slap 0.32s cubic-bezier(0.3, 1.6, 0.5, 1) both;
    animation-delay: 0.55s;
  }
  .shelf-item:nth-child(2) .sticker {
    animation-delay: 0.65s;
  }
  .shelf-item:nth-child(3) .sticker {
    animation-delay: 0.75s;
  }
  .shelf-item:nth-child(4) .sticker {
    animation-delay: 0.85s;
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes slap {
  from {
    opacity: 0;
    transform: scale(1.6) rotate(-24deg);
  }
}

/* ---------- sections, rails, grid ---------- */

.section-title {
  font-weight: 800;
  font-stretch: 66%;
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  line-height: 0.95;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1rem;
}

.section-head p {
  margin: 0;
}

.rail {
  margin-top: 2.5rem;
}

.rail .section-title {
  margin-bottom: 1rem;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0 0 6px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 44%;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.rail-list > li {
  scroll-snap-align: start;
}

.catalog {
  margin-top: 2.75rem;
  scroll-margin-top: 70px;
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 16px;
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-title {
  margin: 0.7rem 0 0.55rem;
  font-size: 1.02rem;
  font-weight: 600;
  font-stretch: 88%;
  line-height: 1.2;
}

.card-title a {
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a:hover {
  text-decoration: underline;
}

.offers {
  display: grid;
  gap: 6px;
  margin-top: auto;
}

.offer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  width: 100%;
  min-height: 42px;
  padding: 0.35em 0.7em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--deck);
  text-align: left;
  cursor: pointer;
}

.offer::after {
  content: "+";
  margin-left: auto;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--sticker);
}

.offer:hover:not(:disabled) {
  border-color: var(--sticker);
}

.offer:disabled {
  cursor: not-allowed;
  background: transparent;
  color: var(--dim);
}

.offer:disabled::after {
  content: none;
}

.offer-cond {
  font-weight: 600;
  font-stretch: 85%;
}

.offer-note {
  font-size: 0.82rem;
  color: var(--mist);
}

.offer:disabled .offer-note {
  color: var(--dim);
}

.price {
  white-space: nowrap;
}

.price-now {
  font-weight: 700;
  color: var(--sticker);
}

.price-sale {
  color: #ff7a7a;
}

.price-was {
  color: var(--dim);
  font-size: 0.85em;
}

.empty {
  padding: 2rem 1.25rem;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  text-align: center;
}

.empty p {
  color: var(--mist);
  max-width: 44ch;
  margin-inline: auto;
  margin-bottom: 1rem;
}

/* ---------- filters ---------- */

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.filters .field-search,
.filters .seg {
  grid-column: 1 / -1;
}

.filters .check {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  gap: 0.35em;
}

.field > span {
  font-weight: 600;
  font-size: 0.95rem;
}

.field small {
  font-size: 0.85rem;
}

input[type="search"],
input[type="text"],
input[type="password"],
input:not([type]),
input[inputmode],
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.55em 0.8em;
  background: var(--deck);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 1rem;
}

textarea {
  resize: vertical;
}

select {
  appearance: none;
  padding-right: 2.2em;
  background-image: linear-gradient(45deg, transparent 50%, var(--mist) 50%), linear-gradient(135deg, var(--mist) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

input::placeholder,
textarea::placeholder {
  color: var(--dim);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--sticker);
}

input[type="file"] {
  width: 100%;
  padding: 0.6em;
  background: var(--deck);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

legend {
  padding: 0;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.35em;
}

.seg {
  display: flex;
  flex-wrap: wrap;
}

.seg > legend:not(.sr-only) {
  width: 100%;
}

.seg label {
  flex: 1;
  position: relative;
}

.seg input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.seg span {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 0 1em;
  border: 1px solid var(--line);
  background: var(--deck);
  font-weight: 700;
  font-stretch: 80%;
}

.seg label:first-of-type span {
  border-radius: var(--radius) 0 0 var(--radius);
}

.seg label:last-of-type span {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.seg label + label span {
  border-left: 0;
}

.seg input:checked + span {
  background: var(--sticker);
  border-color: var(--sticker);
  color: var(--sticker-ink);
}

.seg input:focus-visible + span {
  outline: 3px solid var(--sticker);
  outline-offset: 2px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  min-height: 44px;
  cursor: pointer;
}

.check input,
.choice input {
  width: 20px;
  height: 20px;
  accent-color: var(--sticker);
  margin: 0;
  flex: none;
}

.choice label {
  display: flex;
  align-items: center;
  gap: 0.6em;
  min-height: 40px;
  cursor: pointer;
}

.form-stack {
  display: grid;
  gap: 1.1rem;
}

.form-error {
  margin: 0 0 1.25rem;
  padding: 0.85em 1em;
  border-left: 4px solid var(--sale);
  background: rgba(255, 77, 77, 0.12);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.form-error p,
.form-error ul {
  margin: 0;
}

.form-error ul {
  padding-left: 1.1em;
}

.flash {
  margin: 0 0 1.25rem;
  padding: 0.85em 1em;
  border-left: 4px solid var(--wa);
  background: rgba(37, 211, 102, 0.1);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.note {
  margin: 0;
  padding: 0.75em 1em;
  background: var(--deck);
  border-radius: var(--radius);
  color: var(--mist);
}

.fine {
  font-size: 0.88rem;
  margin: 0;
}

/* ---------- sell band ---------- */

.sell-band {
  margin-top: 3.5rem;
  background: var(--deck);
  border-block: 1px solid var(--line);
}

.sell-band-row {
  display: grid;
  gap: 1rem;
  padding-block: 2rem;
  justify-items: start;
}

.sell-band-text {
  margin: 0;
  font-weight: 800;
  font-stretch: 64%;
  font-size: clamp(1.7rem, 5.5vw, 2.4rem);
  line-height: 1;
  max-width: 22ch;
}

/* ---------- game page ---------- */

.game-page {
  padding-top: 1.25rem;
}

.back {
  margin-bottom: 1rem;
}

.back a {
  color: var(--mist);
}

.game {
  display: grid;
  gap: 1.75rem;
}

.game-media {
  max-width: 340px;
}

.game-title {
  font-weight: 800;
  font-stretch: 60%;
  font-size: clamp(2.4rem, 10vw, 4.2rem);
  line-height: 0.92;
  margin-bottom: 0.4em;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.game-meta .badges {
  position: static;
  flex-direction: row;
}

.chip {
  display: inline-block;
  padding: 0.12em 0.55em;
  border-radius: 3px;
  font-weight: 800;
  font-stretch: 72%;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.chip-ps5 {
  background: var(--paper);
  color: var(--ink);
}

.chip-ps4 {
  background: var(--ps4);
  color: #fff;
}

.buy-list {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.buy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px 16px;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.buy-row .btn {
  grid-column: 1 / -1;
}

.buy-what {
  display: grid;
}

.buy-cond {
  font-weight: 700;
  font-stretch: 80%;
  font-size: 1.3rem;
  line-height: 1.1;
}

.buy-row .price {
  font-size: 1.35rem;
  justify-self: end;
}

.stock {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-size: 0.9rem;
  color: var(--mist);
}

.stock::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.stock-in_stock::before {
  background: var(--ok);
}

.stock-preorder {
  color: var(--sticker);
}

.stock-out_of_stock {
  color: var(--dim);
}

.desc {
  color: var(--mist);
  max-width: 62ch;
  margin-bottom: 1.25rem;
}

/* ---------- cart ---------- */

.page-title {
  font-weight: 800;
  font-stretch: 60%;
  font-size: clamp(2.4rem, 9vw, 3.6rem);
  line-height: 0.95;
  margin: 1.75rem 0 1rem;
}

.cart-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.cart-line {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.cart-line.is-gone {
  opacity: 0.75;
}

.cart-thumb {
  width: 60px;
  height: 80px;
  border-radius: 3px;
  object-fit: cover;
  display: block;
}

.cart-line-title {
  font-weight: 600;
  font-stretch: 90%;
  text-decoration: none;
  line-height: 1.25;
  display: block;
}

.cart-line-main .muted {
  font-size: 0.9rem;
  margin: 0.15em 0 0.5em;
}

.cart-line-side {
  display: grid;
  justify-items: end;
  gap: 0.5rem;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.qty-btn {
  width: 40px;
  height: 38px;
  border: 0;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
}

.qty-btn:disabled {
  color: var(--dim);
  cursor: not-allowed;
}

.qty-n {
  min-width: 1.8em;
  text-align: center;
  font-weight: 700;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 0 0.5rem;
  font-weight: 800;
  font-stretch: 65%;
  font-size: 2rem;
}

.cart-total strong {
  color: var(--sticker);
}

.cart-clear {
  font-size: 0.9rem;
}

.checkout {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.message-page {
  padding-block: 2rem;
}

/* ---------- admin ---------- */

.admin-main {
  padding-bottom: 4rem;
}

.admin .site-nav a:first-child {
  display: inline;
}

.admin .site-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 16px;
  font-size: 0.95rem;
}

.admin .site-head-row {
  flex-wrap: wrap;
  padding-block: 8px;
}

.auth-box {
  margin-inline: auto;
  max-width: 420px;
  padding-top: 1rem;
}

.admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1rem;
}

.admin-head .page-title {
  margin-bottom: 0;
}

.admin-main > .field-search {
  margin-bottom: 1rem;
}

.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.admin-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.admin-thumb {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}

.admin-row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 0.4rem;
  font-weight: 600;
}

.admin-offers {
  display: grid;
  gap: 6px;
}

.stock-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
}

.stock-form select {
  width: auto;
  min-height: 38px;
  padding-block: 0.3em;
}

.admin-offer-label {
  min-width: 9em;
  font-size: 0.95rem;
}

.warn {
  color: var(--sticker);
  font-size: 0.9rem;
  margin: 0 0 0.4rem;
}

.cover-field {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: start;
}

.cover-preview {
  width: 120px;
  height: 160px;
  border: 1px dashed var(--line-2);
  border-radius: 4px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-none {
  color: var(--dim);
  font-size: 0.85rem;
  text-align: center;
  padding: 0.5em;
}

.offer-field {
  padding: 0.9rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.offer-field legend {
  padding: 0 0.4em;
  margin-left: -0.4em;
}

.offer-inputs {
  display: grid;
  gap: 0.8rem;
}

.offer-field.is-off .offer-inputs {
  opacity: 0.4;
}

.danger-zone {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.settings-links {
  margin-top: 1.5rem;
}

/* ---------- wider screens ---------- */

@media (min-width: 480px) {
  .site-nav a:first-child {
    display: inline;
  }
}

@media (min-width: 700px) {
  :root {
    --gutter: 24px;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 32px 20px;
  }
  .rail-list {
    grid-auto-columns: 210px;
  }
  .filters {
    grid-template-columns: minmax(220px, 2fr) auto 1fr 1fr;
    align-items: center;
  }
  .filters .field-search,
  .filters .seg {
    grid-column: auto;
  }
  .filters .check {
    grid-column: 1 / -1;
  }
  .seg {
    flex-wrap: nowrap;
  }
  .foot-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
  .sell-band-row {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .offer-inputs {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .buy-row {
    grid-template-columns: 1fr auto 170px;
  }
  .buy-row .btn {
    grid-column: auto;
  }
}

@media (min-width: 960px) {
  .hero {
    padding: 4rem 0 3.5rem;
  }
  .hero-grid {
    grid-template-columns: 4fr 6fr;
    align-items: center;
    gap: 3rem;
  }
  .shelf {
    overflow: visible;
    padding-right: 0;
  }
  .shelf-item {
    flex: 1 1 0;
  }
  .game {
    grid-template-columns: 400px 1fr;
    gap: 3rem;
    align-items: start;
  }
  .game-media {
    max-width: none;
  }
  .filters {
    grid-template-columns: minmax(260px, 2fr) auto 1fr 1fr auto;
  }
  .filters .check {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
