/* store-custom.css — تخصيصات TopUp2Game فوق AppDashboard */

/* لون العلامة التجارية بنفسجي/سماوي */
:root {
  --accent-color: #7c3aed;
}
[data-theme="dark"] {
  --accent-color: #9f67fa;
}

/* دعم RTL */
body { direction: rtl; text-align: right; font-family: 'Cairo','Geist',sans-serif; }

/* بطاقات المنتجات */
.product-card {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  cursor: pointer;
  transition: all .2s;
  background: var(--surface-color, #fff);
  height: 100%;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.product-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.prod-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--background-color);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.prod-body {
  padding: 10px 12px 14px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  flex-grow: 1;
  justify-content: center;
}
.product-card .prod-emoji { font-size: 2.6rem; line-height: 1; }
.product-card .prod-name { font-weight: 700; font-size: .88rem; color: var(--default-color); line-height: 1.35; }
.product-card .prod-cta { font-size: .78rem; color: var(--accent-color); margin-top: 6px; font-weight: 600; }

/* صورة المنتج المرفوعة — تملأ الإطار بالكامل */
.prod-image {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* زر إضافة/تغيير صورة المنتج (يظهر للأدمن فقط) — فوق الصورة مباشرة */
.prod-img-add {
  position: absolute; top: 8px; left: 8px; z-index: 5;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-color); color: #fff; border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center; font-size: .78rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.35); cursor: pointer; padding: 0; line-height: 1;
  transition: transform .15s;
}
.prod-img-add:hover { transform: scale(1.12); }
.prod-img-add .spinner-border { width: 12px; height: 12px; border-width: 2px; }

/* شبكة المنتجات */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
@media (max-width: 576px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* بطاقة الرصيد الكبيرة */
.balance-hero {
  background: linear-gradient(135deg, var(--accent-color), #06b6d4);
  border-radius: 16px;
  padding: 26px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.balance-hero::after {
  content: '';
  position: absolute;
  top: -40px; left: -40px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,.12);
  border-radius: 50%;
}
.balance-hero .bh-label { font-size: .85rem; opacity: .9; position: relative; }
.balance-hero .bh-amount { font-size: 2.2rem; font-weight: 900; margin: 6px 0; position: relative; }

/* عناصر العروض في المودال */
.offer-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border: 1px solid var(--border-color);
  border-radius: 10px; cursor: pointer; transition: all .15s; margin-bottom: 8px;
}
.offer-row:hover { border-color: var(--accent-color); background: color-mix(in srgb, var(--accent-color), transparent 92%); }
.offer-row.selected { border-color: var(--accent-color); background: color-mix(in srgb, var(--accent-color), transparent 85%); }
.offer-price { color: var(--accent-color); font-weight: 700; }

/* نتيجة الشراء */
.result-code {
  background: var(--background-color); border: 1px dashed var(--accent-color);
  border-radius: 10px; padding: 14px; font-family: 'Geist Mono', monospace;
  font-size: 1.05rem; word-break: break-all; text-align: center; margin: 12px 0;
  color: var(--accent-color);
}

/* شارات الحالة */
.badge-success { background: rgba(16,185,129,.15); color: #10b981; }
.badge-pending { background: rgba(245,158,11,.15); color: #f59e0b; }
.badge-failed  { background: rgba(239,68,68,.15);  color: #ef4444; }

/* نموذج الدخول */
.auth-brand-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-color), #06b6d4);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; margin: 0 auto 16px;
}

/* سبينر */
.mini-spinner {
  width: 28px; height: 28px; border: 3px solid var(--border-color);
  border-top-color: var(--accent-color); border-radius: 50%;
  animation: spin .7s linear infinite; margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ RTL Layout: نقل الشريط الجانبي لليمين ═══ */
.sidebar { left: auto !important; right: 0 !important; border-right: none !important; border-left: 1px solid var(--sidebar-border); }
.sidebar-close, .header-logo, .sidebar-logo { }

@media (min-width: 1200px) {
  .main { margin-left: 0 !important; margin-right: var(--sidebar-width); }
  .sidebar-collapsed .main { margin-right: var(--sidebar-collapsed-width); margin-left:0 !important; }
}

/* تصحيح اتجاه انزلاق القائمة الجانبية فالهاتف (الشريط صار يمين، فيخرج لليمين ماشي لليسار) */
@media (max-width: 1199px) {
  .sidebar { transform: translateX(100%); }
  .sidebar-open .sidebar { transform: translateX(0); }
}

/* الهيدر: عكس الاتجاه */
.header-left { margin-right: 0; }
@media (min-width: 1200px) {
  .header { padding-right: 0; }
}

/* nav-heading و nav-link محاذاة يمين */
.nav-heading { text-align: right; }
.sidebar-nav .nav-link { text-align: right; }
.sidebar-nav .nav-link i { margin-left: 10px; margin-right: 0; }

/* nav pills active */
.nav-pills .nav-link { color: var(--default-color); background: var(--surface-color); border: 1px solid var(--border-color); }
.nav-pills .nav-link.active { background: var(--accent-color); border-color: var(--accent-color); color:#fff; }

/* wrapper محتوى الصفحة */
.page-wrapper { width: 100%; }

/* ═══ شريط التنقّل السفلي (الهاتف فقط) ═══ */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 10px; left: 12px; right: 12px; z-index: 850;
  background: var(--surface-color, #fff);
  border-radius: 22px;
  box-shadow: 0 6px 24px rgba(0,0,0,.16);
  padding: 8px 6px;
  align-items: center; justify-content: space-around;
}
@media (max-width: 991px) {
  .mobile-bottom-nav { display: flex; }
  .main-content { padding-bottom: 78px !important; }
}
.mbn-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted-color); text-decoration: none; font-size: .68rem; font-weight: 600;
  flex: 1; position: relative; padding: 4px 2px;
}
.mbn-item i { font-size: 1.3rem; }
.mbn-item.active { color: var(--accent-color); }
.mbn-center { margin-top: -22px; }
.mbn-center-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color), #06b6d4);
  display: flex; align-items: center; justify-content: center; color: #fff;
  font-size: 1.3rem; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent-color), transparent 50%);
  margin-bottom: 2px;
}
.mbn-center.active .mbn-center-icon { filter: brightness(1.1); }
.mbn-badge {
  position: absolute; top: -2px; right: 18%; background: #ef4444; color: #fff;
  font-size: .62rem; font-weight: 800; border-radius: 50%; width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* بطاقات المناطق (صفحة product.php) */
.region-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 22px 12px; border: 1px solid var(--border-color); border-radius: 16px;
  background: var(--surface-color, #fff); text-decoration: none; height: 100%;
  transition: all .18s;
}
.region-card:hover { border-color: var(--accent-color); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.1); }
.region-card-flag {
  width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; background: var(--background-color);
}
.region-card-img {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; display: block;
}
.region-card-name { font-weight: 700; font-size: .92rem; color: var(--default-color); text-align: center; }

/* ═══ أزرار الأقسام بتأثير 3D ═══ */
.cat-pills-3d { list-style: none; padding: 0; margin: 0; }
.cat-pill-3d {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 12px; font-weight: 700; font-size: .9rem;
  color: #fff !important; text-decoration: none;
  background: linear-gradient(180deg, var(--accent-color), color-mix(in srgb, var(--accent-color), #000 20%));
  box-shadow:
    0 4px 0 color-mix(in srgb, var(--accent-color), #000 35%),
    0 6px 14px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.25);
  border: none; transition: transform .12s, box-shadow .12s;
  transform: translateY(0);
}
.cat-pill-3d:hover { color:#fff !important; transform: translateY(-2px); }
.cat-pill-3d:active, .cat-pill-3d.active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--accent-color), #000 35%),
    0 2px 6px rgba(0,0,0,.15),
    inset 0 1px 0 rgba(255,255,255,.2);
}
.cat-pill-3d.active {
  background: linear-gradient(180deg, #06b6d4, color-mix(in srgb, #06b6d4, #000 25%));
  box-shadow:
    0 2px 0 color-mix(in srgb, #06b6d4, #000 35%),
    0 3px 8px rgba(0,0,0,.15),
    inset 0 1px 0 rgba(255,255,255,.25);
}
@media (max-width: 576px) {
  .cat-pill-3d { padding: 8px 13px; font-size: .8rem; }
}

/* ═══ الشريط المتحرك (Marquee) بالصفحة الرئيسية ═══ */
.marquee-wrap {
  overflow: hidden; width: 100%; direction: ltr;
  border-radius: 14px; margin-bottom: 16px;
}
.marquee-track {
  display: flex; width: max-content; gap: 12px;
}
.marquee-track.rtl-scroll { animation: marquee-rtl 26s linear infinite; }
.marquee-track.ltr-scroll { animation: marquee-ltr 26s linear infinite; }
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-rtl { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marquee-ltr { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.marquee-item {
  flex: 0 0 auto; width: 160px; height: 90px; border-radius: 12px; overflow: hidden;
  position: relative; box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.marquee-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.marquee-item .marquee-label {
  position: absolute; bottom: 0; right: 0; left: 0; padding: 4px 8px;
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
  color: #fff; font-size: .72rem; font-weight: 700; text-align: center; direction: rtl;
}
.ads-banner { width: 100%; border-radius: 14px; overflow: hidden; margin-bottom: 10px; }
.ads-banner img { width: 100%; max-height: 140px; object-fit: cover; display: block; }
@media (max-width: 576px) {
  .marquee-item { width: 120px; height: 70px; }
  .ads-banner img { max-height: 100px; }
}

/* بطاقات طرق الدفع (USD) */
.payment-method-card { transition: border-color .15s, transform .15s; }
.payment-method-card:hover { transform: translateY(-2px); }

/* تصحيح موضع أيقونة البحث فلوحة البحث بالهاتف (RTL) */
.mobile-search .search-form input { padding: 0 44px 0 var(--spacing-md, 16px); }
.mobile-search .search-form button { left: auto; right: 8px; }

/* أفاتار الملف الشخصي */
.profile-avatar {
  width: 84px; height: 84px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color), #06b6d4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 2rem;
}

/* ═══ شبكة الأقسام السريعة (بطاقات قابلة لصورة، كيما GlobalFlexy) ═══ */
.quick-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  align-items: start;
  gap: 16px;
}
.quick-cat-card {
  position: relative;
  display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  text-decoration: none; padding: 12px 12px 16px;
  background: var(--surface-color, #fff);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 3px 0 rgba(0,0,0,.04), 0 6px 16px rgba(0,0,0,.06);
  transition: transform .15s, box-shadow .15s;
}
.quick-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 0 rgba(0,0,0,.04), 0 10px 22px rgba(0,0,0,.1);
  border-color: var(--accent-color);
}
.quick-cat-card.active {
  border-color: var(--accent-color);
  background: color-mix(in srgb, var(--accent-color), transparent 92%);
  box-shadow: 0 3px 0 rgba(0,0,0,.04), 0 8px 18px rgba(0,0,0,.08);
}
.quick-cat-icon {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 2.35rem;
  box-shadow: 0 4px 10px rgba(0,0,0,.18);
}
.quick-cat-icon-img { padding: 0 !important; overflow: hidden; background: var(--background-color); box-shadow: none; }
.quick-cat-icon-img img { width: 100% !important; height: 100% !important; object-fit: cover !important; object-position: center !important; display: block; border-radius: inherit; }
.quick-cat-label {
  font-size: .82rem; font-weight: 700; color: var(--default-color); text-align: center;
  line-height: 1.25;
}
.quick-cat-arrow {
  display: block; text-align: center;
  color: var(--accent-color); font-size: .78rem;
}
.quick-cat-has-image .quick-cat-label,
.quick-cat-has-image .quick-cat-arrow { display: none; }
.quick-cat-has-image { padding-bottom: 10px; }
@media (max-width: 576px) {
  .quick-cat-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .quick-cat-card { padding: 9px 9px 12px; border-radius: 14px; }
  .quick-cat-icon { font-size: 1.7rem; border-radius: 11px; }
  .quick-cat-label { font-size: .68rem; }
  .quick-cat-arrow { display: none; }
}
