/* ════════════════════════════════════════════════════════════════
   GAYYAR PRO · صفحة Xbox Game Pass المستقلة
   تُحمَّل فوق category.css وتعيد تلوين متغيّرات الثيم إلى أخضر
   إكسبوكس، تماماً كما تفعل صفحة العلامة (brand.html) مع كل علامة
   بث. النتيجة: الشريط العلوي والسلة والفوتر يأخذون الطابع نفسه
   بلا تكرار قواعد.
   ════════════════════════════════════════════════════════════════ */

.xg-body {
  /* ألوان إكسبوكس */
  --x:        #107C10;   /* الأخضر الرسمي — التعبئات والأزرار */
  --x-lite:   #6ee06e;   /* نص وأسعار على خلفية داكنة */
  --x-neon:   #9BF00B;   /* وميض/تمييز */
  --x-glow:   rgba(110, 224, 110, 0.42);
  --x-soft:   rgba(16, 124, 16, 0.14);
  --x-line:   rgba(110, 224, 110, 0.16);

  /* إعادة تلوين ثيم الصفحة (الشريط العلوي، الروابط، الفوتر) */
  --gold:       #6ee06e;
  --gold-light: #b7f5b0;
  --gold-deep:  #107C10;
  --gold-glow:  rgba(110, 224, 110, 0.42);
  --gold-soft:  rgba(110, 224, 110, 0.12);
  --gold-faint: rgba(110, 224, 110, 0.05);

  background: #05090a;
}

/* ── خلفية: سديم إكسبوكس + أفق الكرة ───────────────────────────── */
.xg-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 95% 52% at 50% -12%, rgba(16, 124, 16, 0.34) 0%, transparent 62%),
    radial-gradient(ellipse 55% 38% at 88% 12%, rgba(155, 240, 11, 0.08) 0%, transparent 60%),
    #05090a;
}
/* قوس خافت يوحي بانحناء كرة إكسبوكس خلف الترويسة */
.xg-bg::after {
  content: "";
  position: absolute;
  top: -78vw; left: 50%; transform: translateX(-50%);
  width: 150vw; height: 150vw; max-width: 1500px; max-height: 1500px;
  border-radius: 50%;
  border: 1px solid rgba(110, 224, 110, 0.10);
  box-shadow: inset 0 0 120px rgba(16, 124, 16, 0.10);
}

/* ── الترويسة: قفل تعاون — شعار إكسبوكس × شعار المتجر ──────────── */
.xg-hero { position: relative; text-align: center; padding: 42px 16px 20px; }

.xg-lock {
  display: inline-flex; align-items: center; gap: 20px;
  color: var(--x-lite);          /* لون واحد للطرفين */
}
.xg-mark {
  width: 76px; height: 76px; flex-shrink: 0;
  filter: drop-shadow(0 0 24px var(--x-glow));
}
.xg-x {
  font-family: 'Orbitron', sans-serif; font-size: 24px; font-weight: 400;
  opacity: 0.42; line-height: 1; -webkit-user-select: none; user-select: none;
}
/* شعار المتجر بالأخضر نفسه: نُقنّع الصورة ونملأ القناع بـ currentColor،
   فلا نحتاج نسخة خضراء من الملف ولا يختلف اللون لو غُيّر المتغيّر لاحقاً.
   النسبة 1191×1103 محفوظة في العرض والارتفاع. */
.xg-store {
  width: 82px; height: 76px; flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-image: url("../../img/logo.png"); mask-image: url("../../img/logo.png");
  -webkit-mask-size: contain;    mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center;  mask-position: center;
  filter: drop-shadow(0 0 24px var(--x-glow));
}

/* ── تبويبا طريقة التسليم ──────────────────────────────────────── */
.xg-tabs {
  display: flex; gap: 9px; justify-content: center; flex-wrap: wrap;
  margin: 26px 0 12px; padding-inline: 14px;
}
.xg-tab {
  min-height: 46px;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #9fb3a0;
  border-radius: 14px; padding: 11px 22px;
  font-family: inherit; font-size: 14px; font-weight: 800;
  transition: background 0.16s, border-color 0.16s, color 0.16s, box-shadow 0.16s;
}
.xg-tab.on {
  background: linear-gradient(180deg, rgba(16, 124, 16, 0.30), rgba(16, 124, 16, 0.14));
  border-color: rgba(110, 224, 110, 0.55);
  color: #fff;
  box-shadow: 0 0 26px -8px var(--x-glow);
}
.xg-note {
  text-align: center; font-size: 13px; color: #8a9a8b; line-height: 1.9;
  max-width: 560px; margin: 0 auto 24px; padding-inline: 16px;
}

/* ── شبكة البطاقات ─────────────────────────────────────────────── */
.xg-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 14px;
  max-width: 1180px; margin-inline: auto; padding: 0 16px 70px;
}
.xg-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 124, 16, 0.075), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--x-line);
  border-radius: 16px;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
/* الشريط الأخضر العلوي — لمسة واجهة إكسبوكس */
.xg-card::before {
  content: ""; position: absolute; top: 0; inset-inline: 0; height: 2px; z-index: 2;
  background: linear-gradient(90deg, transparent, var(--x-neon), transparent);
  opacity: 0.4;
  transition: opacity 0.18s;
}
.xg-card:hover {
  transform: translateY(-3px);
  border-color: rgba(110, 224, 110, 0.5);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.6), 0 0 34px -14px var(--x-glow);
}
.xg-card:hover::before { opacity: 1; }

.xg-thumb {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; flex-shrink: 0;
  background: #081109;
}
.xg-thumb img { width: 100%; height: 100%; object-fit: cover; }
/* تدرّج سفلي يفصل الصورة عن الجسم مهما كان لونها */
.xg-thumb::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 46%;
  background: linear-gradient(to top, rgba(5, 9, 10, 0.85), transparent);
  pointer-events: none;
}
.xg-noimg {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 12px;
  font-size: 11.5px; color: #5f7360;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='%236ee06e' fill-opacity='.20'%3E%3Cpath d='M126.8,248.3c39.7-58.6,77.9-92.8,77.9-92.8s-42.1-48.9-92.8-67.4l-3.3-.8A224.13,224.13,0,0,0,77.2,391C77.2,386.6,77.8,320.7,126.8,248.3Z'/%3E%3Cpath d='M480,256A223.71,223.71,0,0,0,403.4,87.3l-3.2.9c-50.7,18.5-92.9,67.4-92.9,67.4s38.2,34.2,77.9,92.8c49,72.4,49.6,138.3,49.5,142.7A222.8,222.8,0,0,0,480,256Z'/%3E%3Cpath d='M201.2,80.9c29.3,13.1,54.6,34.6,54.6,34.6s25.5-21.4,54.8-34.6c36.8-16.5,64.9-11.3,72.3-9.5a224.06,224.06,0,0,0-253.8,0C136.3,69.6,164.3,64.3,201.2,80.9Z'/%3E%3Cpath d='M358.7,292.9C312.4,236,255.8,199,255.8,199s-56.3,37-102.7,93.9c-39.8,48.9-54.6,84.8-62.6,107.8l-1.3,4.8a224,224,0,0,0,333.6,0l-1.4-4.8C413.4,377.7,398.5,341.8,358.7,292.9Z'/%3E%3C/svg%3E") center 40% / 62px 62px no-repeat,
    linear-gradient(135deg, rgba(16, 124, 16, 0.18), rgba(5, 9, 10, 0.6));
}

.xg-body-in { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.xg-name { font-size: 14.5px; font-weight: 800; line-height: 1.45; color: #fff; }
.xg-desc { font-size: 12px; color: #8a9a8b; line-height: 1.7; flex: 1; }
/* السعر بخطّ الصفحة الطبيعي — Orbitron كان يجعل الأرقام تُقرأ كشعار
   لا كسعر. نفس ما اعتُمد في صفحة بلايستيشن بلس ليتوحّد الشكل. */
.xg-price {
  font-family: 'Cairo', sans-serif; font-weight: 900; font-size: 21px;
  color: var(--x-lite); text-shadow: 0 0 20px rgba(110, 224, 110, 0.28);
}
.xg-price small {
  font-family: 'Cairo', sans-serif; font-size: 12px; font-weight: 400; color: #6b7d6c;
  margin-inline-start: 3px;
}
.xg-add {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px; border: none; border-radius: 12px;
  background: var(--x); color: #fff;
  font-family: inherit; font-size: 13.5px; font-weight: 800;
  box-shadow: 0 6px 20px -8px rgba(16, 124, 16, 0.9);
  transition: filter 0.16s, transform 0.16s;
}
.xg-add:hover { filter: brightness(1.18); transform: translateY(-1px); }
.xg-add:active { transform: translateY(0); }

.xg-empty {
  grid-column: 1 / -1; text-align: center; color: #6b7d6c;
  padding: 56px 20px; font-size: 14px; line-height: 2;
}

/* ── هاتف — الجمهور الأساسي ────────────────────────────────────── */
@media (max-width: 560px) {
  .xg-hero { padding: 28px 14px 12px; }
  .xg-lock { gap: 14px; }
  .xg-mark { width: 58px; height: 58px; }
  .xg-store { width: 63px; height: 58px; }
  .xg-x { font-size: 19px; }
  .xg-tabs { margin: 20px 0 10px; gap: 7px; }
  .xg-tab { padding: 11px 16px; font-size: 13px; }
  .xg-note { font-size: 12px; margin-bottom: 18px; }
  .xg-grid { grid-template-columns: repeat(2, 1fr); gap: 11px; padding-inline: 12px; }
  .xg-body-in { padding: 11px; gap: 8px; }
  .xg-name { font-size: 13px; }
  .xg-desc { display: none; }
  .xg-price { font-size: 19px; }
  .xg-add { font-size: 12.5px; padding: 11px 8px; }
}
/* هدف اللمس لا ينزل عن ٤٤ بكسل */
@media (max-width: 768px) { .xg-add { min-height: 44px; } }

@media (prefers-reduced-motion: reduce) {
  .xg-card, .xg-add { transition: none; }
  .xg-card:hover, .xg-add:hover { transform: none; }
}
