/* =========================================================
   WASM STORE — تصميم بسيط وخفيف، بألوان مستوحاة من اللوجو
   ========================================================= */

:root {
  --bg: #07142a;
  --bg-soft: #0c1f3d;
  --panel: #102a4c;
  --panel-border: #1c3b64;
  --cyan: #2fe6c9;
  --blue: #2f7ef0;
  --orange: #f7941e;
  --orange-2: #f4632e;
  --text: #eaf3ff;
  --text-dim: #9db3cf;
  --radius: 14px;
  --font: "Tajawal", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  scroll-behavior: smooth;
}

body.rtl { direction: rtl; }
body:not(.rtl) { direction: ltr; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(7, 20, 42, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--panel-border);
}

@media (max-width: 700px) {
    .site-header {
        flex-wrap: wrap;
    }

    .main-nav {
        flex-basis: 100%;
        order: 3;
        display: flex;
        justify-content: center;
    }
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  color: var(--text);
  /* اسم الموقع لا يُترجم أبداً */
}

.main-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.main-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: background 0.15s, color 0.15s;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--panel);
  color: var(--cyan);
}

/* ---------- Language switcher ---------- */
.lang-switcher {
  position: relative;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.lang-dropdown {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 6px;
  display: none;
  flex-direction: column;
  min-width: 160px;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.lang-dropdown.open { display: flex; }

.lang-option {
  background: none;
  border: none;
  color: var(--text-dim);
  text-align: start;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.88rem;
}

.lang-option:hover { background: var(--bg-soft); color: var(--text); }
.lang-option.active { color: var(--cyan); }

/* ---------- Hero ---------- */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 20px 30px;
  text-align: center;
  cursor: default;
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin: 0 0 12px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.7;
}

/* ---------- Sections grid (home) ---------- */
.section-grid {
  max-width: 1100px;
  margin: 30px auto 60px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 800px) {
  .section-grid { grid-template-columns: 1fr; }
}

.section-card {
  background: linear-gradient(160deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform 0.15s, border-color 0.15s;
}

.section-card:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
}

.section-card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(47, 230, 201, 0.12);
  color: var(--cyan);
  margin-bottom: 14px;
  font-size: 1.4rem;
}

.section-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.section-card p { margin: 0 0 14px; color: var(--text-dim); font-size: 0.9rem; }

.section-card .go {
  display: inline-block;
  color: var(--orange);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---------- Container / page title ---------- */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}

.page-title {
  font-size: 1.4rem;
  margin: 6px 0 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.breadcrumb {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.breadcrumb a { color: var(--cyan); }

/* ---------- Platform / category tiles ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.tile {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  transition: border-color 0.15s, transform 0.15s;
}

.tile:hover { border-color: var(--blue); transform: translateY(-2px); }

/* ---------- Card grid (games / accounts / topup items) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, transform 0.15s;
}

.card:hover { border-color: var(--cyan); transform: translateY(-2px); }

.card .thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--bg-soft);
}

.card .body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card .title { font-weight: 700; font-size: 0.98rem; }

.card .price {
  color: var(--orange);
  font-weight: 800;
  font-size: 1rem;
}

.badge-sold {
  align-self: flex-start;
  background: rgba(244, 99, 46, 0.15);
  color: var(--orange-2);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
}

.card .view-btn {
  margin-top: auto;
  text-align: center;
  padding: 9px;
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ---------- Detail page ---------- */
.detail-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 30px;
}

@media (max-width: 800px) {
  .detail-wrap { grid-template-columns: 1fr; }
}

.gallery-main {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--panel-border);
  background: var(--bg-soft);
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.gallery-thumbs img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
}

.gallery-thumbs img.active { border-color: var(--cyan); }

.detail-info h2 { margin-top: 0; }

.detail-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--orange);
  margin: 10px 0;
}

.detail-desc {
  color: var(--text-dim);
  line-height: 1.8;
  white-space: pre-line;
  margin-bottom: 22px;
}

.btn-order {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
  color: #0a0a0a;
  font-weight: 800;
  font-size: 1rem;
  border: none;
}

.btn-order:hover { filter: brightness(1.08); }

/* ---------- Topup items list ---------- */
.topup-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.topup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 14px 16px;
}

.topup-row .name { font-weight: 700; }
.topup-row .desc { color: var(--text-dim); font-size: 0.85rem; margin-top: 2px; }
.topup-row .price { color: var(--orange); font-weight: 800; }

.topup-row .order-mini {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid var(--panel-border);
}

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  color: var(--text-dim);
  padding: 60px 20px;
  font-size: 0.95rem;
  cursor: default;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--panel-border);
  padding: 26px 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: default;
}

.site-footer .brand-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    color: var(--text);
    text-decoration: none;
    transition: transform 0.25s ease;
}
.site-footer .brand-name svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.site-footer .brand-name:hover {
    transform: scale(1.06);
    background: linear-gradient(
        45deg,
        #feda75,
        #fa7e1e,
        #d62976,
        #962fbf,
        #4f5bd5
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-footer .brand-name:hover svg {
    color: #d62976;
}

/* ---------- Loader ---------- */
.loader {
  text-align: center;
  padding: 40px;
  color: var(--text-dim);
  cursor: default;
}
