:root {
  --shop-bg: #070b12;
  --shop-card: #111827;
  --shop-card-hover: #1a2332;
  --shop-border: #1f2937;
  --shop-text: #f8fafc;
  --shop-muted: #94a3b8;
  --shop-accent: #7c6cff;
  --shop-accent-hover: #9588ff;
  --shop-green: #34d399;
  --shop-glow: rgba(124, 108, 255, 0.35);
  --shop-radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  background: var(--shop-bg);
  color: var(--shop-text);
  line-height: 1.55;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.game-card h2 a {
  color: inherit;
  text-decoration: none;
}

.game-card h2 a:hover {
  text-decoration: underline;
  color: var(--shop-accent-hover);
}

.game-card-media {
  position: relative;
}

.game-card-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
}

.game-shop-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.game-shop-badge-hot {
  background: rgba(52, 211, 153, 0.9);
  color: #042f1a;
}

.game-shop-badge-deal {
  background: rgba(124, 108, 255, 0.9);
  color: #fff;
}

.seo-product-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
}

.seo-product-card {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(200px, 320px) 1fr;
  align-items: start;
}

.seo-product-img {
  width: 100%;
  border-radius: var(--shop-radius);
  object-fit: cover;
}

.seo-product-price {
  font-size: 1.35rem;
  margin: 0 0 1rem;
}

@media (max-width: 640px) {
  .seo-product-card {
    grid-template-columns: 1fr;
  }
}

.shop-seo-text {
  max-width: 720px;
  margin: 2rem auto 0;
  padding: 1.25rem;
  border-top: 1px solid var(--shop-border);
  color: var(--shop-muted);
  font-size: 0.95rem;
}

.shop-seo-text h2 {
  color: var(--shop-text);
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
}

.shop-seo-text ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.shop-seo-text a {
  color: var(--shop-green);
}

dialog:not([open]) {
  display: none !important;
}

.shop-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124, 108, 255, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(52, 211, 153, 0.06), transparent),
    var(--shop-bg);
}

.shop-header {
  border-bottom: 1px solid var(--shop-border);
  padding: 2.25rem 1.25rem 2rem;
  backdrop-filter: blur(12px);
}

.shop-header-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-end;
}

.shop-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  color: var(--shop-accent-hover);
  margin: 0 0 0.4rem;
  font-weight: 700;
}

.shop-header h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.shop-tagline {
  margin: 0.55rem 0 0;
  color: var(--shop-muted);
  font-size: 1.05rem;
  max-width: 36rem;
}

.shop-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.trust-pill {
  font-size: 0.82rem;
  color: var(--shop-green);
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.shop-main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 4rem;
}

.shop-intro {
  margin-bottom: 1.75rem;
  padding: 1rem 1.25rem;
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  color: var(--shop-muted);
  font-size: 0.95rem;
}

.shop-count {
  margin: 0.5rem 0 0;
  color: var(--shop-text);
  font-weight: 600;
  font-size: 0.88rem;
}

.shop-intro-hint {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--shop-muted);
}

.shop-platform-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 1140px;
  margin: 0 auto 1.25rem;
  padding: 0 1.25rem;
}

.platform-chip {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--shop-border);
  background: rgba(17, 24, 39, 0.85);
  color: var(--shop-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.platform-chip:hover {
  border-color: rgba(124, 108, 255, 0.45);
  color: var(--shop-text);
}

.platform-chip.active {
  background: rgba(124, 108, 255, 0.2);
  border-color: var(--shop-accent);
  color: var(--shop-text);
}

.platform-chip-n {
  opacity: 0.75;
  font-weight: 500;
  margin-left: 0.15rem;
}

.shop-catalog {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.platform-section {
  margin-bottom: 2.5rem;
}

.platform-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--shop-border);
}

.platform-section-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.platform-section-count {
  font-size: 0.85rem;
  color: var(--shop-muted);
}

.shop-empty-section {
  text-align: center;
  color: var(--shop-muted);
  padding: 2rem 1rem;
}

.game-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.game-badge-good {
  background: rgba(52, 211, 153, 0.2);
  color: var(--shop-green);
}

.game-badge-ok {
  background: rgba(148, 163, 184, 0.15);
  color: var(--shop-muted);
}

.shop-loading {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--shop-muted);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  50% { opacity: 0.55; }
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.35rem;
}

.game-card {
  background: var(--shop-card);
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(124, 108, 255, 0.5);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(124, 108, 255, 0.15);
  outline: none;
}

.game-card-media {
  position: relative;
  background: #0f172a;
}

.game-card-media > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  display: block;
  background: linear-gradient(165deg, #1a2332 0%, #0f172a 100%);
}

.game-card-media > img.img-broken {
  opacity: 0.35;
}

.game-card .no-img {
  aspect-ratio: 2 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(160deg, #1e293b, #0f172a);
  color: var(--shop-muted);
  font-size: 2.5rem;
}

.game-card .no-img small {
  font-size: 0.75rem;
}

.game-card-body {
  padding: 1rem 1.1rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.game-platform {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--shop-accent-hover);
  font-weight: 700;
}

.game-card h2 {
  margin: 0.35rem 0 0.45rem;
  font-size: 0.98rem;
  line-height: 1.35;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-desc {
  font-size: 0.8rem;
  color: var(--shop-muted);
  margin: 0 0 0.85rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
}

.game-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--shop-green);
  letter-spacing: -0.02em;
}

.game-prices {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.game-shipping-hint {
  font-size: 0.72rem;
  color: var(--shop-muted);
}

.card-cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--shop-accent-hover);
}

/* Product detail dialog */
.product-dialog,
.order-dialog {
  border: 1px solid var(--shop-border);
  border-radius: calc(var(--shop-radius) + 4px);
  padding: 0;
  background: var(--shop-card);
  color: var(--shop-text);
  max-width: 920px;
  width: calc(100% - 1.5rem);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.product-dialog::backdrop,
.order-dialog::backdrop {
  background: rgba(4, 7, 12, 0.78);
  backdrop-filter: blur(4px);
}

.dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--shop-border);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: var(--shop-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover {
  color: var(--shop-text);
  border-color: var(--shop-accent);
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 0;
}

@media (max-width: 720px) {
  .product-layout {
    grid-template-columns: 1fr;
  }
}

.product-gallery {
  background: #0a0f18;
  padding: 1.25rem;
  border-right: 1px solid var(--shop-border);
}

.product-gallery #product-hero {
  width: 100%;
  max-height: min(420px, 55vh);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  background: #0f172a;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.product-thumbs {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.product-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #0f172a;
  width: 56px;
  height: 56px;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

.product-thumb.active {
  border-color: var(--shop-accent);
}
  display: block;
}

.product-info {
  padding: 1.75rem 1.75rem 1.5rem;
  position: relative;
}

.product-info h2 {
  margin: 0.4rem 0 0.75rem;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.product-desc {
  color: var(--shop-muted);
  font-size: 0.95rem;
  margin: 0 0 1rem;
  line-height: 1.6;
}

.product-bullets {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  color: var(--shop-muted);
  font-size: 0.88rem;
}

.product-bullets li {
  margin: 0.25rem 0;
}

.product-price-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--shop-border);
}

.product-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--shop-green);
  display: block;
}

.product-ship {
  font-size: 0.85rem;
  color: var(--shop-muted);
}

.btn-buy {
  background: linear-gradient(135deg, var(--shop-accent), #5b4fd9);
  color: white;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--shop-glow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px var(--shop-glow);
}

.btn-buy-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
}

/* Order dialog */
.order-dialog {
  max-width: 440px;
}

.order-dialog form {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: relative;
}

.order-preview {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  margin-bottom: 0.25rem;
}

.order-preview img {
  width: 56px;
  height: 74px;
  object-fit: cover;
  border-radius: 8px;
}

.order-dialog h2 {
  margin: 0;
  font-size: 1.15rem;
}

.order-delivery {
  border: 1px solid var(--shop-border);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  margin: 0;
}

.order-delivery legend {
  font-size: 0.78rem;
  color: var(--shop-muted);
  padding: 0 0.25rem;
}

.delivery-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  margin: 0.35rem 0;
  cursor: pointer;
}

.delivery-option input {
  accent-color: var(--shop-accent);
}

.order-total-box {
  background: rgba(52, 211, 153, 0.07);
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  color: var(--shop-muted);
  margin: 0.2rem 0;
}

.order-total-sum {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--shop-border);
  font-weight: 700;
  color: var(--shop-text);
}

.order-total-sum span:last-child {
  color: var(--shop-green);
  font-size: 1.15rem;
}

.order-dialog label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: var(--shop-muted);
}

.order-dialog input,
.order-dialog textarea {
  background: var(--shop-bg);
  border: 1px solid var(--shop-border);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  color: var(--shop-text);
  font: inherit;
}

.order-note {
  font-size: 0.82rem;
  color: var(--shop-muted);
  margin: 0;
}

.order-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn-primary {
  flex: 1;
  background: var(--shop-accent);
  color: white;
  border: none;
  padding: 0.7rem;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--shop-border);
  color: var(--shop-muted);
  padding: 0.7rem 1rem;
  border-radius: 12px;
  cursor: pointer;
}

.shop-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--shop-muted);
  font-size: 1.05rem;
}

.shop-footer {
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  border-top: 1px solid var(--shop-border);
  color: var(--shop-muted);
  font-size: 0.9rem;
}

.shop-admin-link a {
  color: var(--shop-muted);
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--shop-green);
  color: #052e16;
  padding: 0.85rem 1.35rem;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  z-index: 200;
}

.thanks-dialog {
  border: 1px solid var(--shop-border);
  border-radius: calc(var(--shop-radius) + 4px);
  padding: 1.5rem;
  background: var(--shop-card);
  color: var(--shop-text);
  max-width: 520px;
  width: calc(100% - 1.5rem);
}

.pay-mobilepay-hero {
  background: linear-gradient(145deg, rgba(91, 141, 255, 0.18), rgba(46, 204, 113, 0.12));
  border: 1px solid rgba(91, 141, 255, 0.35);
  border-radius: 16px;
  padding: 1.15rem 1.2rem 1.2rem;
  margin-bottom: 1rem;
}

.pay-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(46, 204, 113, 0.2);
  color: #6ee7a8;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.pay-title {
  margin: 0 0 0.65rem;
  font-size: 1.35rem;
}

.pay-steps {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--shop-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.pay-hero-amount {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.pay-hero-phone {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.5rem;
}

.pay-hero-ref {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--shop-muted);
}

.pay-copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-pay-copy {
  flex: 1 1 auto;
  min-width: 7rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--shop-border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--shop-text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-pay-copy.primary {
  background: rgba(91, 141, 255, 0.25);
  border-color: rgba(91, 141, 255, 0.5);
}

.btn-pay-copy:hover,
.btn-pay-copy-sm:hover {
  filter: brightness(1.08);
}

.pay-bank-details {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.pay-bank-details summary {
  cursor: pointer;
  color: var(--shop-muted);
  margin-bottom: 0.5rem;
}

.pay-bank-hint {
  color: var(--shop-muted);
  font-size: 0.82rem;
  margin: 0 0 0.65rem;
}

.pay-bank-grid {
  display: grid;
  gap: 0.5rem;
}

.pay-bank-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
}

.pay-bank-row span {
  color: var(--shop-muted);
}

.pay-bank-row code {
  word-break: break-all;
  font-size: 0.82rem;
}

.btn-pay-copy-sm {
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--shop-border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--shop-text);
  font-size: 0.75rem;
  cursor: pointer;
}

.thanks-email-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--shop-muted);
  text-align: center;
}

.thanks-payment.hidden {
  display: none;
}

.order-status-page {
  max-width: 520px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.back-shop {
  color: var(--shop-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.order-status-box {
  background: var(--shop-card);
  border: 1px solid var(--shop-border);
  border-radius: 16px;
  padding: 1.25rem;
  margin: 1rem 0;
}

.order-status-box[data-status="new"] .order-status-label {
  color: #fbbf24;
}

.order-status-box[data-status="paid"] .order-status-label {
  color: #6ee7a8;
}

.order-status-box[data-status="shipped"] .order-status-label {
  color: #93c5fd;
}

.order-status-label {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.order-status-message {
  margin: 0;
  line-height: 1.5;
}

.order-status-hint {
  color: var(--shop-muted);
  font-size: 0.88rem;
}

.order-status-tracking-wrap {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(147, 197, 253, 0.08);
  border: 1px solid rgba(147, 197, 253, 0.25);
}

.order-status-tracking-label {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #93c5fd;
}

.order-status-tracking-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.order-status-tracking-row code {
  flex: 1 1 auto;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  word-break: break-all;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}

.order-status-tracking-link {
  display: inline-block;
  margin-top: 0.65rem;
  color: #93c5fd;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.order-status-tracking-link:hover {
  text-decoration: underline;
}

.thanks-track {
  text-align: center;
  margin: 0.75rem 0 0;
}

.thanks-track a {
  color: #93c5fd;
  font-weight: 600;
}

.thanks-dialog h2 {
  margin: 0 0 0.5rem;
}

.thanks-lead {
  color: var(--shop-muted);
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.thanks-payment {
  background: rgba(0, 0, 0, 0.25);
  padding: 1rem;
  border-radius: 12px;
  white-space: pre-wrap;
  font-size: 0.85rem;
  line-height: 1.5;
  max-height: 280px;
  overflow: auto;
  margin: 0 0 1rem;
}

.thanks-dialog .btn-buy-lg {
  width: 100%;
}
