/* Shop-Seite (site/shop.html). Baut auf site.css auf.
   Bühnen (Klassen-Sets, Reittiere) zeichnet shop.js in ganzen Bildschirmpunkten je Spielpixel; Bilder hier
   (Goldhaufen, Symbole) nur ganzzahlig vergrößert. Glanz in der Farbe des Angebots über --glow (r, g, b). */
.shop-page main { padding: 66px 0 0; min-height: 0; }
/* Kopfleiste deckend: beim Scrollen scheint nichts durch (Handy) */
.shop-page .top { background: #06030a; backdrop-filter: none; }
.shop-page .title { margin-bottom: 10px; }
.shop-page main section[id] { scroll-margin-top: 66px; }

/* Zustand des Shops (öffnet in Kürze, Admin-Vorschau): leise unter den Services */
.shop-state { margin: clamp(40px, 5vw, 60px) 0 0; font-size: 14px; color: var(--soft); }
.shop-state:empty { display: none; }
.shop-state + .shop-legal { margin-top: 8px; }
.shop-notice { margin: 0; padding: 14px var(--gutter); text-align: center; color: #e7f6dc; background: rgba(40, 90, 50, 0.32); border-bottom: 1px solid rgba(120, 200, 120, 0.3); }
.shop-notice + .shop-notice { display: none; }
[data-shop-cancel].shop-notice { color: #e7d8bc; background: rgba(60, 40, 14, 0.4); border-color: rgba(184, 134, 42, 0.35); }

/* ---------- Preise und Knöpfe */
.shop-page .btn { white-space: nowrap; }
.price { font: 700 clamp(24px, 2.2vw, 30px)/1 var(--font-title); color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Noch nicht kaufbar (Shop geschlossen, Angebot ohne Serverseite): sichtbar inaktiv, Hauptknöpfe mit Glutrand.
   Kaufbar werden sie orange „Kaufen“; Nebenknöpfe glühen dann beim Überfahren wie die Hauptknöpfe. */
.shop-page .btn:disabled { cursor: default; transform: none; opacity: 1; background: #0c0610; border-color: rgba(106, 69, 38, 0.55); color: var(--muted); box-shadow: none; text-shadow: none; }
.shop-page .btn.primary:disabled { border-color: rgba(200, 100, 40, 0.6); color: #c9a37a; }
.shop-page .btn[data-buy]:not(.primary):not(:disabled):hover { background: linear-gradient(180deg, #a8481a 0 50%, #86320f 50% 100%); border-color: #ffb050; color: #fff6e6; text-shadow: 0 2px 0 #3a1004; }
.shop-page .btn.owned:disabled { border-color: #3c8a6a; color: #9be3c4; }
.shop-fine { margin: 22px 0 0; max-width: 52em; font-size: 14px; color: var(--muted); }
.shop-fine a { color: var(--soft); }

/* ---------- Klassen-Sets: Bühne mit dem Helden (shop.js), Text links */
.sets { --glow: 255, 150, 40; position: relative; overflow: hidden; isolation: isolate; padding: clamp(40px, 6vw, 80px) 0 clamp(40px, 5vw, 64px);
  background: linear-gradient(180deg, #07030b 0%, #0c0612 55%, var(--bg) 100%); }
.sets .embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; image-rendering: pixelated; opacity: 0.8; }
/* Funken nur über der Bühne, damit sie im Text nicht wie Satzzeichen wirken (am Handy liegt der Text unter der Bühne: dort keine) */
@media (min-width: 701px) { .sets .embers { left: auto; right: 0; width: 52%; } }
@media (max-width: 700px) { .sets .embers { display: none; } }
.sets-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 60px); align-items: center; }
.set-tabs { display: flex; flex-wrap: wrap; gap: 6px clamp(14px, 1.6vw, 24px); margin: clamp(22px, 3vw, 34px) 0 clamp(18px, 2.4vw, 28px); border-bottom: 1px solid rgba(106, 69, 38, 0.45); }
.set-tabs button { background: none; border: 0; padding: 8px 0 11px; margin-bottom: -1px; cursor: pointer; white-space: nowrap; font: 600 clamp(15px, 1.3vw, 19px)/1 var(--font-title); color: var(--muted); border-bottom: 3px solid transparent; transition: color 0.15s, border-color 0.15s; }
.set-tabs button:hover { color: var(--text); }
.set-tabs button[aria-selected="true"] { color: #fff1d6; border-bottom-color: var(--ember); }
.set-panel h2 { margin: 0 0 10px; font: 700 clamp(28px, 3vw, 40px)/1.08 var(--font-title); color: #fbe9c6; text-wrap: balance; text-shadow: 0 0 26px rgba(var(--glow), 0.28); }
.set-panel p { margin: 0; max-width: 30em; color: var(--soft); font-size: clamp(16px, 1.3vw, 17px); }
.set-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px; margin-top: clamp(22px, 3vw, 32px); }
.set-buy .price { font-size: clamp(30px, 3vw, 38px); }
.set-panel .set-kind { margin: 0 0 8px; font: 700 12px/1 var(--font); letter-spacing: 0.16em; text-transform: uppercase; color: rgb(var(--glow)); }

.set-stage { position: relative; display: flex; flex-direction: column; align-items: center; }
.set-stage canvas { display: block; width: 100%; height: var(--sh, 200px); }
.set-switch { display: inline-flex; margin-top: 4px; border: 1px solid rgba(106, 69, 38, 0.8); background: rgba(8, 4, 12, 0.85); }
.set-switch button { min-width: 112px; min-height: 40px; padding: 0 18px; border: 0; background: none; cursor: pointer; font: 700 12px/1 var(--font); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); transition: color 0.15s, background 0.15s; }
.set-switch button:hover { color: var(--text); }
.set-switch button[aria-pressed="true"] { color: #1a0604; background: linear-gradient(#f0b04a, #d9782a); }
.no-js .set-stage { display: none; }

/* ---------- Exklusive Reittiere: Schaulauf über Steppenboden (shop.js), darunter die Auswahl */
.mounts { padding: clamp(40px, 5vw, 64px) 0 0; }
.show { --glow: 255, 130, 30; position: relative; margin-top: 0; }
.show canvas { display: block; width: 100%; height: var(--ph, 360px); }
.no-js .show { display: none; }
.mount-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 8px; }
.mount { position: relative; display: flex; flex-direction: column; padding: 22px 24px 22px; cursor: pointer; outline-offset: 4px;
  background: #0b0610;
  border: 1px solid rgba(var(--glow), 0.28); transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.mount:hover { border-color: rgba(var(--glow), 0.6); }
.mount[aria-selected="true"] { border-color: rgb(var(--glow)); background: color-mix(in srgb, rgb(var(--glow)) 6%, #0b0610); box-shadow: 0 0 0 1px rgb(var(--glow)); }
/* Kerbe zur Bühne über der gewählten Karte */
.mount[aria-selected="true"]::before { content: ""; position: absolute; left: 50%; top: -7px; width: 12px; height: 12px; translate: -50% 0; rotate: 45deg; background: #0b0610;
  border-left: 1px solid rgb(var(--glow)); border-top: 1px solid rgb(var(--glow)); }
.mount h3 { margin: 0 0 8px; font: 700 clamp(22px, 2vw, 26px)/1.1 var(--font-title); color: color-mix(in srgb, rgb(var(--glow)) 30%, #fff1d6); }
.mount p { margin: 0 0 20px; color: var(--soft); font-size: 15px; }
.mount-buy { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto; }

/* ---------- Gold */
.gold { padding: clamp(70px, 8vw, 104px) 0 0; }
.packs { list-style: none; margin: clamp(26px, 3vw, 40px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.pack { position: relative; display: flex; flex-direction: column; align-items: center; padding: 26px 14px 18px; text-align: center;
  background: #0b0610; border: 1px solid rgba(106, 69, 38, 0.7); }
.pack img { width: 144px; height: 92px; margin: 0 0 14px; }
.pack b { font: 700 clamp(24px, 2.2vw, 30px)/1.05 var(--font-title); color: #fff1d6; font-variant-numeric: tabular-nums; }
.pack > span { margin-top: 4px; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.pack em { min-height: 22px; margin-top: 6px; font-style: normal; font-size: 13px; color: #9be38a; }
.pack .price { margin: 14px 0 14px; font-size: 22px; }
.pack .btn { width: 100%; padding: 0 8px; }
.pack.best { border-color: var(--edge-hi); background: #120a0c; box-shadow: 0 0 0 1px var(--edge-hi); }
.pack-tag { position: absolute; top: -11px; padding: 5px 10px; font: 700 11px/1 var(--font); font-style: normal; letter-spacing: 0.14em; text-transform: uppercase; color: #1a0a02; background: var(--gold); }

/* ---------- Services */
.services { padding: clamp(70px, 8vw, 104px) 0 clamp(80px, 9vw, 120px); }
.svc-list { list-style: none; margin: clamp(26px, 3vw, 40px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.svc { display: flex; flex-direction: column; padding: 24px; background: #0b0610; border: 1px solid rgba(106, 69, 38, 0.7); }
.svc img { width: 104px; height: 104px; margin: 0 0 16px; }   /* 52er-Feinfassung ×2 */
.svc h3 { margin: 0 0 8px; font: 700 22px/1.15 var(--font-title); color: #fff1d6; }
.svc p { margin: 0 0 20px; color: var(--soft); font-size: 15px; }
.svc-buy { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto; }
.svc .price { font-size: 24px; }
.shop-legal { margin-top: clamp(40px, 5vw, 60px); }

/* ---------- Kauf bestätigen */
.buy-dlg { width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 2px solid var(--edge); background: #0d0714; color: var(--text);
  box-shadow: 0 0 0 2px #050208, 0 30px 80px rgba(0, 0, 0, 0.7); }
.buy-dlg::backdrop { background: rgba(3, 1, 6, 0.86); }
.buy-dlg-inner { position: relative; padding: 30px clamp(20px, 4vw, 34px) 30px; }
.buy-x { position: absolute; top: 8px; right: 10px; width: 40px; height: 40px; border: 0; background: none; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.buy-x:hover { color: var(--text); }
.buy-dlg h2 { margin: 0 0 8px 0; font: 700 clamp(22px, 2.4vw, 28px)/1.15 var(--font-title); color: #fbe9c6; }
.buy-head { display: flex; align-items: center; gap: 18px; margin: 0 34px 22px 0; }
.buy-thumb { flex: none; display: grid; place-items: center; min-width: 96px; min-height: 96px; padding: 10px; background: #08040c; border: 1px solid rgba(106, 69, 38, 0.7); }
.buy-thumb canvas { display: block; image-rendering: pixelated; }
.buy-price { margin: 0; font: 700 24px/1 var(--font-title); color: var(--gold); }
.buy-price small { margin-left: 6px; font: 400 13px/1 var(--font); color: var(--muted); }
.buy-msg { margin: 0 0 18px; color: var(--soft); }
.shop-char { margin: 0 0 18px; }
.shop-char select { min-height: 46px; padding: 0 12px; background: #0a050f; color: var(--text); border: 1px solid var(--edge); font: 400 16px var(--font); }
.shop-waiver { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text); cursor: pointer; }
.shop-waiver input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--ember); }
.shop-terms { margin: 10px 0 0 34px; font-size: 14px; }
.shop-minor { margin: 4px 0 0 34px; font-size: 13px; color: var(--muted); }
.shop-error { margin: 14px 0 0; color: #ff8f72; }
.buy-go { width: 100%; margin-top: 22px; }

/* ---------- Schmalere Bildschirme */
@media (max-width: 1080px) {
  .packs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .packs .pack:nth-child(4) { grid-column: 1 / 2; }
  .svc-list { grid-template-columns: minmax(0, 1fr); }
  .svc { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 0 22px; align-items: center; }
  .svc img { margin: 0; }
  .svc p { margin: 0; }
  .svc-buy { flex-direction: column; align-items: flex-end; margin: 0; }
}
@media (max-width: 1080px) and (min-width: 761px) {
  .packs .pack:nth-child(4), .packs .pack:nth-child(5) { grid-column: auto; }
  .packs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .packs .pack { grid-column: span 2; }
  .packs .pack:nth-child(4) { grid-column: 2 / span 2; }
}
@media (max-width: 700px) {
  /* Reihenfolge: Klassenwahl, Bühne, Set mit Preis und Knopf */
  .sets-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sets-side { display: contents; }
  .set-tabs { order: 1; } .set-stage { order: 2; } .set-panel { order: 3; }
  .sets { padding-top: 18px; }
  .set-panel { margin-top: 14px; }
  .set-panel > p:not(.set-kind) { order: 2; }
  .set-panel:not([hidden]) { display: flex; flex-direction: column; }
  .set-panel h2 { order: 0; margin-bottom: 4px; } .set-buy { order: 1; margin: 6px 0 14px; } .set-panel .set-kind { order: -1; }
  .set-tabs { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; margin-bottom: 0; }
}
@media (max-width: 900px) {
  .set-tabs { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; column-gap: 10px; }
  .set-tabs button { font-size: 14px; }
  .mount-list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .mount { padding: 18px 20px; }
  .mount p { margin-bottom: 14px; }
  .mount:not([aria-selected="true"]) p { display: none; }
  .mount:not([aria-selected="true"]) .mount-buy .btn { display: none; }
  .mount:not([aria-selected="true"]) { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .mount:not([aria-selected="true"]) h3 { margin: 0; }
  .mount:not([aria-selected="true"]) .mount-buy { margin: 0; }
  .mount[aria-selected="true"]::before { display: none; }
}
@media (max-width: 820px) {
  .shop-page main { padding-top: 58px; }
}
@media (max-width: 760px) {
  .mounts > .wrap:first-child .sec-line { display: none; }
  .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .packs .pack:nth-child(4) { grid-column: auto; }
  .packs .pack.best { grid-column: 1 / -1; order: -1; }
  .pack { padding: 22px 10px 14px; }
  .svc { grid-template-columns: 52px minmax(0, 1fr); gap: 0 16px; padding: 18px; }
  .svc img { width: 52px; height: 52px; align-self: start; }
  .svc-buy { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; margin-top: 16px; }
  .svc p { margin: 0; }
}
@media (max-height: 500px) and (min-width: 701px) {
  .sets { padding: 14px 0 24px; }
  .set-tabs { margin: 0 0 12px; }
  .set-panel h2 { font-size: 24px; margin-bottom: 6px; }
  .set-panel p { font-size: 14px; }
  .set-buy { margin-top: 12px; }
  .set-buy .price { font-size: 28px; }
  .set-buy .btn.big { min-height: 46px; padding: 0 24px; font-size: 13px; }

    .sets-layout { align-items: start; }
  .set-switch button { min-width: 96px; min-height: 32px; padding: 0 12px; font-size: 11px; }
}
@media (max-width: 420px) {
  .set-tabs button { font-size: 14px; }
  .set-buy .btn { flex: 1; }
}
