/* =============================================================
   GAMELO STORE — mobile-fix.css  v2.7
   إصلاح شامل للتجاوب: صفحة حسابي + لوحة الأدمن + العام
   يُحمَّل بعد main.css
   ============================================================= */

/* ─────────────────────────────────────────────────────────────
   1. GLOBAL BOX-SIZING & OVERFLOW GUARD
   ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

img, video, iframe, svg, embed, object {
  max-width: 100%;
  height: auto;
}

p, h1, h2, h3, h4, h5, h6, span, a, li, td, th, label {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ─────────────────────────────────────────────────────────────
   2. CONTAINER
   ───────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  padding-inline: clamp(12px, 4vw, 24px);
  margin-inline: auto;
}

/* ─────────────────────────────────────────────────────────────
   3. BUTTONS — حجم لمس آمن
   ───────────────────────────────────────────────────────────── */
.btn, button,
.product-card__btn, .icon-btn,
.g-bell, .menu-toggle {
  min-height: 42px;
  min-width: 42px;
}

.btn {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─────────────────────────────────────────────────────────────
   4. HERO
   ───────────────────────────────────────────────────────────── */
.hero {
  padding: clamp(2rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  min-height: 0;
}
.hero__title { font-size: clamp(1.75rem, 5.5vw, 4.5rem); line-height: 1.1; }
.hero__desc  { font-size: clamp(0.88rem, 2.2vw, 1.1rem); line-height: 1.7; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__visual {
  position: relative;
  height: clamp(340px, 45vw, 540px);
  perspective: 1200px;
  overflow: visible;
}
.gift-card {
  position: absolute;
  width: clamp(200px, 28vw, 320px);
  height: clamp(130px, 17vw, 200px);
  border-radius: 14px;
  padding: clamp(.85rem, 1.8vw, 1.3rem);
}
.gift-card .gc-amount { font-size: clamp(1.5rem, 3.5vw, 2.6rem); }
.gift-card .gc-brand  { font-size: clamp(.82rem, 1.8vw, 1.1rem); }
.gift-card .gc-brand i { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }

/* ─────────────────────────────────────────────────────────────
   5. PRODUCTS / CATEGORIES / FEATURES GRIDS
   ───────────────────────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 45vw), 1fr));
  gap: 1rem;
}
.product-card { min-width: 0; width: 100%; }
.product-card__thumb { aspect-ratio: 16/10; overflow: hidden; }
.product-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card__title {
  font-size: clamp(.82rem, 2.2vw, 1rem); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card__price .price-now { font-size: clamp(.9rem, 2.5vw, 1.2rem); }
.product-badge { max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(160px, 43vw), 1fr));
  gap: clamp(.5rem, 2vw, 1rem);
}
.category-card { min-width: 0; padding: clamp(1rem, 3vw, 1.5rem); }
.category-card h3 { font-size: clamp(.82rem, 2.2vw, 1.05rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 43vw), 1fr));
  gap: clamp(.75rem, 2vw, 1.25rem);
}
.feature-item { min-width: 0; }

/* ─────────────────────────────────────────────────────────────
   6. SECTION SPACING
   ───────────────────────────────────────────────────────────── */
.section { padding: clamp(2.5rem, 7vw, 4.5rem) 0; }
.section-head { margin-bottom: clamp(1.25rem, 4vw, 2.5rem); }
.section-head h2 { font-size: clamp(1.35rem, 4vw, 2.1rem); }
.eyebrow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ─────────────────────────────────────────────────────────────
   7. HEADER & TOP BAR
   ───────────────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 9000; }
.site-header__inner {
  display: flex; align-items: center;
  gap: clamp(8px, 2vw, 16px);
  padding: 12px clamp(12px, 4vw, 24px);
  min-height: 60px;
}
.site-title { font-size: clamp(1rem, 3.5vw, 1.3rem); flex-shrink: 0; white-space: nowrap; }

.top-bar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 6px 0; flex-wrap: nowrap; overflow: hidden;
}
.top-bar__msg { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-utility-bar { flex-shrink: 0; display: flex; align-items: center; gap: 4px; }

/* ─────────────────────────────────────────────────────────────
   8. CTA / NEWSLETTER / FOOTER
   ───────────────────────────────────────────────────────────── */
.g-newsletter-box { width: 100%; padding: clamp(1.5rem, 5vw, 3rem) clamp(1rem, 4vw, 2rem); }
.newsletter-form { display: flex; flex-direction: row; gap: .5rem; flex-wrap: wrap; }
.newsletter-form input { flex: 1 1 180px; min-width: 0; }
.newsletter-form .btn { flex-shrink: 0; }

.cta-box {
  display: grid; grid-template-columns: 1.3fr 1fr;
  align-items: center; gap: 2rem;
  padding: clamp(2rem, 5vw, 4rem); overflow: hidden;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr !important; gap: 2rem !important; }
.footer-about p { word-break: break-word; }

/* ─────────────────────────────────────────────────────────────
   9. TABLES — wrapper
   ───────────────────────────────────────────────────────────── */
.g-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-inline: -4px;
  padding-inline: 4px;
}

/* ─────────────────────────────────────────────────────────────
   ██████████████████  BREAKPOINTS  ██████████████████
   ───────────────────────────────────────────────────────────── */

/* ══════════ ≤ 1024px — Tablet ══════════ */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .hero__visual { max-width: 480px; margin: 0 auto; height: clamp(300px, 55vw, 420px); }
  .gift-card   { width: clamp(170px, 36vw, 270px); height: clamp(108px, 22vw, 170px); }
  .hero__actions, .hero__brands, .cta-actions { justify-content: center; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-box { grid-template-columns: 1fr; text-align: center; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; }
  .footer-about { grid-column: 1 / -1; text-align: center; }
}

/* ══════════ ≤ 768px — Mobile ══════════ */
@media (max-width: 768px) {

  /* ── Container ── */
  .container { padding-inline: 14px; }

  /* ── Top bar ── */
  .top-bar__inner { padding: 5px 0; font-size: .7rem; }
  .top-bar__msg   { font-size: .68rem; }
  .g-utility-bar a, .g-utility-bar button { padding: 4px 8px; font-size: .68rem; }
  .g-utility-bar .g-balance-pill { padding: 4px 10px; font-size: .7rem; }
  .g-currency-dd { display: none !important; }

  /* ── Header ── */
  .site-header__inner { padding: 10px 14px; min-height: 56px; gap: 8px; }
  .site-title { font-size: 1rem; }
  .site-title .logo-mark { width: 30px; height: 30px; font-size: 1rem; }
  .main-navigation { display: none !important; }
  .menu-toggle { display: flex !important; }
  .header-actions .btn-sm span { display: none; }
  .header-actions .btn-sm { padding: 6px 10px; }

  /* ── Hero ── */
  .hero { padding: 28px 0 20px !important; }
  .hero__inner { grid-template-columns: 1fr !important; gap: 1.5rem; text-align: center; }
  .hero__title { font-size: clamp(1.55rem, 7.5vw, 2.2rem) !important; line-height: 1.2; }
  .hero__desc  { font-size: .86rem; margin-bottom: 1.2rem; }
  .hero__actions { flex-direction: column; gap: 8px; width: 100%; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .hero__visual { height: clamp(220px, 60vw, 320px); max-width: 100%; overflow: hidden; margin: 0 auto; }
  .gift-card { width: clamp(130px, 38vw, 200px); height: clamp(82px, 23vw, 126px); padding: clamp(.55rem, 2vw, .85rem); border-radius: 10px; }
  .gift-card .gc-amount { font-size: clamp(1.1rem, 4vw, 1.7rem); }
  .gift-card .gc-brand  { font-size: clamp(.65rem, 2vw, .85rem); gap: 4px; }
  .gift-card .gc-brand i { font-size: clamp(1rem, 3vw, 1.4rem); }
  .gift-card .gc-chip { width: 24px; height: 18px; }
  .gift-card.ps      { top: 6px;   right: 4%; }
  .gift-card.xbox    { top: 38%;   left: 2%; }
  .gift-card.netflix { bottom: 14%; right: 8%; }
  .gift-card.spotify { bottom: 2%;  left: 6%; }

  /* ── Sections & Misc ── */
  .section { padding: 36px 0; }
  .section-head { margin-bottom: 20px; }
  .section-head h2 { font-size: 1.3rem !important; }
  .section-head--row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .eyebrow { font-size: .7rem; padding: .35rem .75rem; }
  .g-grid-2 { grid-template-columns: 1fr !important; gap: 14px; }
  .g-cards-4 { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .g-box { padding: 16px; }
  .g-toast { left: 12px !important; right: 12px !important; bottom: 72px !important; }
  .g-whatsapp-fab { bottom: 14px; left: 14px; width: 50px; height: 50px; font-size: 1.4rem; }
  .g-whatsapp-fab::after { display: none; }

  /* ── Features / Categories / Products ── */
  .features-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .feature-item  { padding: 12px 8px !important; flex-direction: column !important; text-align: center; gap: 6px !important; }
  .feature-item > i { width: 38px !important; height: 38px !important; font-size: 1rem !important; }
  .feature-item h4  { font-size: .8rem !important; margin: 0 !important; }
  .feature-item p   { font-size: .72rem !important; }

  .categories-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .category-card { padding: 14px 10px !important; }
  .category-card__icon { width: 42px !important; height: 42px !important; font-size: 1.15rem !important; margin-bottom: 6px !important; }
  .category-card h3 { font-size: .82rem !important; }
  .category-card .count { font-size: .7rem; }

  .products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .product-card__body { padding: 10px !important; }
  .product-card__title { font-size: .85rem !important; }
  .product-card__price .price-now { font-size: .92rem !important; }
  .product-card__btn { width: 34px; height: 34px; }
  .product-card__rating { font-size: .68rem; }

  /* ── CTA / Newsletter / Footer ── */
  .g-newsletter-section { padding: 2.5rem 0; }
  .g-newsletter-box { padding: 1.5rem 1rem; }
  .newsletter-form { flex-direction: column; gap: 8px; }
  .newsletter-form input, .newsletter-form .btn { width: 100%; justify-content: center; }
  .cta-box { grid-template-columns: 1fr !important; padding: 22px 16px !important; text-align: center; gap: 14px; }
  .cta-actions { flex-direction: column; width: 100%; gap: 8px; }
  .cta-actions .btn { width: 100%; justify-content: center; }
  .featured-banner { grid-template-columns: 1fr !important; padding: 22px 16px !important; text-align: center; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 20px !important; }
  .footer-about { grid-column: 1 / -1 !important; text-align: center; }
  .footer-about .social-links { justify-content: center; }
  .footer-bottom__inner { flex-direction: column; gap: 8px; text-align: center; padding: 12px 0; }
  .payment-methods { justify-content: center; flex-wrap: wrap; }

  /* ── Page hero / breadcrumb ── */
  .page-header, .g-hero-page { padding: 28px 0 20px !important; }
  .page-header .page-title, .g-hero-page h1 { font-size: 1.45rem !important; }
  .breadcrumbs { font-size: .7rem; flex-wrap: wrap; }

  /* ── Trust section ── */
  .trust-grid   { grid-template-columns: 1fr !important; gap: 20px; }
  .trust-visual { display: none; }
  .trust-stats  { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; padding: 14px !important; }
  .trust-stat   { padding: 12px 10px; }
  .trust-stat strong { font-size: 1.4rem !important; }
  .trust-stat span   { font-size: .72rem !important; }

  /* ── Reviews ── */
  .testimonials-grid, .reviews-grid { grid-template-columns: 1fr !important; gap: 10px; }

  /* ── Single product ── */
  .product-layout { grid-template-columns: 1fr !important; gap: 20px; }
  .product-title  { font-size: 1.2rem !important; }
  .product-gallery { min-height: 210px; padding: 20px !important; }
  .product-tabs .tabs-nav { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .product-tabs .tabs-nav::-webkit-scrollbar { display: none; }
  .tabs-nav .tab-btn { white-space: nowrap; font-size: .8rem; padding: 9px 13px !important; }
  .product-specs { grid-template-columns: 1fr !important; }
  .product-guarantees { grid-template-columns: 1fr 1fr !important; }

  /* ── Notifications bell drawer ── */
  .g-bell-drawer {
    position: fixed !important;
    top: 60px !important; right: 10px !important; left: 10px !important;
    width: auto !important; max-height: 70vh !important;
    overflow-y: auto !important;
  }

  /* ═══════════════════════════════════════════════════════════
     ██  صفحة حسابي — Account Page  ██
     ═══════════════════════════════════════════════════════════ */

  /* التخطيط العام */
  .g-account-wrap {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 0 !important;
    align-items: start;
  }

  /* الشريط الجانبي → شريط علوي أفقي */
  .g-account-side {
    position: sticky !important;
    top: 56px !important;
    z-index: 800 !important;
    padding: 12px 14px !important;
    border-radius: 0 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    background: var(--g-bg, #0A0B14) !important;
    border-bottom: 1px solid var(--g-border, rgba(255,255,255,.08)) !important;
  }

  /* معلومات المستخدم: صف أفقي مضغوط */
  .g-account-user {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid var(--g-border, rgba(255,255,255,.08)) !important;
  }
  .g-account-user img {
    width: 38px !important; height: 38px !important;
    border-radius: 50%; flex-shrink: 0 !important;
  }
  .g-account-user > div { min-width: 0; }
  .g-account-user strong { font-size: .88rem !important; display: block; }
  .g-account-user small  { font-size: .72rem !important; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .g-level-badge { font-size: .68rem !important; padding: 2px 7px !important; display: inline-flex; margin-top: 2px; }

  /* رصيد المحفظة: صف أفقي مدمج مع المستخدم */
  .g-account-balance {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    background: rgba(183,246,66,.05) !important;
    border: 1px solid rgba(183,246,66,.15) !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    margin-bottom: 10px !important;
  }
  .g-account-balance small { font-size: .72rem !important; color: var(--g-text-muted, #6b7280); }
  .g-account-balance strong { font-size: 1.1rem !important; color: var(--g-lime, #B7F642) !important; font-family: monospace; }
  .g-loyalty-mini { font-size: .72rem; display: flex; align-items: center; gap: 5px; }
  .g-loyalty-mini i { color: var(--g-lime, #B7F642); }
  .g-streak { font-size: .68rem; }
  .g-account-balance .btn-block { flex: 0 0 auto !important; width: auto !important; padding: 8px 14px !important; font-size: .8rem !important; }

  /* شريط التنقل: أفقي قابل للتمرير */
  .g-account-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    scrollbar-width: none !important;
    gap: 5px !important;
    padding: 2px 0 4px !important;
    list-style: none !important;
    margin: 0 !important;
  }
  .g-account-nav::-webkit-scrollbar { display: none !important; }
  .g-account-nav li { list-style: none !important; flex-shrink: 0 !important; padding: 0 !important; }
  .g-account-nav a {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 7px 12px !important;
    font-size: .75rem !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    scroll-snap-align: start !important;
    border-radius: 20px !important;
    background: rgba(255,255,255,.04) !important;
    border: 1px solid var(--g-border, rgba(255,255,255,.08)) !important;
    color: var(--g-text-soft, #b6bbd3) !important;
    text-decoration: none !important;
    transition: all .15s !important;
  }
  .g-account-nav a.is-active {
    background: rgba(183,246,66,.12) !important;
    border-color: rgba(183,246,66,.3) !important;
    color: var(--g-lime, #B7F642) !important;
  }
  .g-account-nav a i { display: inline !important; font-size: .75rem !important; flex-shrink: 0 !important; }
  .g-nav-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 16px; height: 16px;
    font-size: .62rem !important;
    padding: 0 4px !important;
    border-radius: 8px !important;
    background: rgba(255,255,255,.15) !important;
    color: #fff !important;
    font-weight: 700 !important;
  }
  .g-nav-badge--red { background: rgba(255,61,138,.5) !important; }

  /* المحتوى الرئيسي */
  .g-account-main {
    padding: 16px 14px 80px !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .g-account-main h2 { font-size: 1.1rem !important; }
  .g-account-main h3 { font-size: .95rem !important; margin: 16px 0 10px !important; }

  /* رأس القسم */
  .g-pane-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid var(--g-border, rgba(255,255,255,.08)) !important;
    flex-wrap: wrap !important;
  }
  .g-pane-header h2 { font-size: 1.05rem !important; margin: 0 !important; }

  /* ── Dashboard KPI Cards ── */
  .g-account-pane .g-cards-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .g-account-pane .g-cards-4 .g-card {
    padding: 12px 10px !important;
    text-align: center !important;
    min-width: 0 !important;
  }
  .g-account-pane .g-cards-4 .g-card i  { font-size: 1.3rem !important; margin-bottom: 4px !important; }
  .g-account-pane .g-cards-4 .g-card h3 { font-size: .72rem !important; margin: 3px 0 !important; line-height: 1.3; }
  .g-account-pane .g-cards-4 .g-card p  { font-size: .9rem !important; word-break: break-word !important; font-family: monospace; }
  .g-account-pane .g-cards-4 .g-card small { font-size: .68rem !important; }

  /* ── Loyalty progress bar ── */
  .g-loyalty-progress {
    margin: 16px 0 !important;
    padding: 14px !important;
    border-radius: 10px !important;
  }
  .g-loyalty-progress > div:first-child {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
  .g-loyalty-progress > div:last-child {
    gap: 4px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
  }
  .g-loyalty-progress > div:last-child::-webkit-scrollbar { display: none !important; }
  .g-loyalty-progress > div:last-child span { font-size: .65rem !important; flex-shrink: 0 !important; }

  /* ── Grid 2 columns → 1 ── */
  .g-account-pane .g-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* ── Boxes ── */
  .g-account-pane .g-box {
    padding: 14px !important;
    border-radius: 10px !important;
    min-width: 0 !important;
  }

  /* ── Orders table → cards ── */
  .g-table { display: block !important; width: 100% !important; }
  .g-table thead { display: none !important; }
  .g-table tbody, .g-table tr { display: block !important; }
  .g-table tbody { display: flex !important; flex-direction: column !important; gap: 8px !important; }
  .g-table tr {
    border: 1px solid var(--g-border, rgba(255,255,255,.08)) !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    background: var(--g-bg-soft, rgba(255,255,255,.03)) !important;
    margin-bottom: 0 !important;
  }
  .g-table td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 8px !important;
    padding: 5px 0 !important;
    border: none !important;
    border-bottom: 1px solid rgba(255,255,255,.04) !important;
    font-size: .8rem !important;
    min-width: 0 !important;
  }
  .g-table td:last-child { border-bottom: none !important; }
  .g-table td::before {
    content: attr(data-label) !important;
    color: var(--g-text-muted, #6b7280) !important;
    font-weight: 600 !important;
    margin-inline-end: 8px !important;
    flex-shrink: 0 !important;
    font-size: .72rem !important;
    min-width: 70px !important;
  }
  .g-table td > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

  /* ── Order detail button ── */
  .g-order-toggle { width: 100%; justify-content: center; margin-top: 4px; }

  /* ── Order timeline ── */
  .g-order-timeline { gap: 2px; }
  .g-timeline-icon  { width: 32px; height: 32px; font-size: .75rem; }
  .g-timeline-step span { font-size: .62rem; line-height: 1.3; word-break: break-word; }
  .g-order-timeline::before { top: 16px; }

  /* ── Wallet transactions ── */
  .g-account-pane .g-grid-2 .g-box:first-child { order: 2; }
  .g-account-pane .g-grid-2 .g-box:last-child  { order: 1; }

  /* ── Wishlist & Products grid ── */
  .g-products-grid, .g-wishlist-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .g-product-card { min-width: 0; }
  .g-product-card__body { padding: 10px 12px 12px !important; }
  .g-product-card__body h3 { font-size: .82rem !important; }
  .g-product-card__price   { font-size: .88rem !important; }
  .g-product-card__body .btn { width: 100%; justify-content: center; }

  /* ── Referral link row ── */
  .g-copy-row { flex-wrap: wrap !important; gap: 8px !important; }
  .g-copy-row .g-input { flex: 1 1 100% !important; min-width: 0 !important; width: 100% !important; font-size: .75rem !important; }
  .g-copy-row .btn { flex: 1 1 100% !important; justify-content: center !important; }

  /* Referral stats numbers */
  .g-account-pane [style*="font-size:2.5rem"] { font-size: 1.8rem !important; }
  .g-account-pane [style*="font-size:1.8rem"] { font-size: 1.4rem !important; }

  /* ── Social share buttons ── */
  .g-social-share { flex-wrap: wrap !important; gap: 6px !important; }
  .g-social-share .btn { flex: 1 1 calc(50% - 6px) !important; justify-content: center !important; }

  /* ── Loyalty redeem box ── */
  .g-redeem-box { padding: 14px !important; }
  .g-redeem-box > div[style*="display:flex"] { flex-wrap: wrap !important; gap: 8px !important; }
  .g-redeem-box input.g-input { max-width: 100% !important; flex: 1 1 120px !important; min-width: 0 !important; }
  .g-redeem-box .btn { flex: 1 1 auto !important; justify-content: center !important; }

  /* ── Badges grid in loyalty ── */
  .g-badges-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }
  .g-badge-item  { padding: 10px 6px !important; text-align: center !important; }
  .g-badge-item span { font-size: .68rem !important; }

  /* ── Lucky wheel ── */
  .g-wheel-wrap { max-width: 260px !important; margin: 0 auto !important; }

  /* ── Activity list ── */
  .g-activity-item { gap: 10px !important; align-items: flex-start !important; }
  .g-activity-icon { width: 32px !important; height: 32px !important; flex-shrink: 0 !important; font-size: .85rem !important; }
  .g-activity-body p     { font-size: .82rem !important; margin: 0 0 2px !important; }
  .g-activity-body small { font-size: .7rem !important; }

  /* ── Profile form ── */
  .g-account-pane .g-form { gap: 10px !important; }
  .g-account-pane .g-form label {
    display: block !important;
    font-size: .78rem !important;
    font-weight: 600 !important;
    color: var(--g-text-soft, #b6bbd3) !important;
    margin-bottom: 10px !important;
  }
  .g-account-pane .g-form input,
  .g-account-pane .g-form select,
  .g-account-pane .g-form textarea {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 5px !important;
    padding: 10px 12px !important;
    font-size: .88rem !important;
    font-family: inherit !important;
    border-radius: 8px !important;
  }
  .g-account-pane .g-form input[type="file"] { padding: 8px; font-size: .8rem; }
  .g-account-pane .g-form button[type="submit"] {
    width: 100% !important;
    justify-content: center !important;
    min-height: 46px !important;
  }

  /* ── 2FA section ── */
  .g-2fa-setup { padding: 0 !important; }
  .g-2fa-qr img { max-width: 180px !important; margin: 0 auto 12px; display: block; }
  .g-2fa-secret { font-size: .75rem !important; word-break: break-all !important; }
  #gamelo-2fa-form > div[style*="display:flex"] { flex-wrap: wrap !important; gap: 8px !important; }
  #gamelo-2fa-otp { max-width: 100% !important; flex: 1 1 140px !important; }
  #gamelo-2fa-enable-btn { flex: 1 1 auto !important; justify-content: center !important; }

  /* ── Gift card redemption ── */
  .g-gift-card-box { padding: 16px !important; }
  #gamelo-gift-card-form { flex-direction: column !important; gap: 10px !important; align-items: stretch !important; }
  #gamelo-gift-code { min-width: 0 !important; flex: 1 1 100% !important; font-size: .85rem !important; letter-spacing: 1.5px !important; }
  #gamelo-gift-card-form .btn { justify-content: center !important; }

  /* ── Alerts ── */
  .g-alert { font-size: .82rem !important; padding: 10px 12px !important; }
  .g-alert i { font-size: .95rem !important; }

  /* ── Page hero ── */
  .g-hero-page { padding: 20px 0 14px !important; }
  .g-hero-page h1   { font-size: 1.25rem !important; }
  .g-hero-page .lead { font-size: .82rem !important; }

  /* ═══════════════════════════════════════════════════════════
     ██  لوحة الأدمن — Frontend Admin Panel  ██
     ═══════════════════════════════════════════════════════════ */

  /* الشريط الجانبي → شريط علوي أفقي */
  body.ga-body { display: block !important; }
  .ga-sidebar {
    position: sticky !important;
    top: 0 !important;
    height: auto !important;
    z-index: 900 !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    border-left: none !important;
    border-bottom: 1px solid var(--g-border, rgba(255,255,255,.08)) !important;
    display: flex !important;
    overflow: hidden !important;
  }

  .ga-brand {
    display: flex !important;
    align-items: center !important;
    padding: 10px 12px !important;
    border-bottom: none !important;
    flex-shrink: 0 !important;
    gap: 6px !important;
  }
  .ga-brand-mark { width: 30px !important; height: 30px !important; font-size: .85rem !important; flex-shrink: 0 !important; }
  .ga-brand-text { display: none !important; }

  .ga-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 4px !important;
    padding: 8px 8px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  .ga-nav::-webkit-scrollbar { display: none !important; }
  .ga-nav__item {
    flex: 0 0 auto !important;
    padding: 8px 11px !important;
    margin-bottom: 0 !important;
    white-space: nowrap !important;
    font-size: .8rem !important;
    border-radius: 8px !important;
    min-height: 36px !important;
  }
  .ga-nav__item span { display: none !important; }
  .ga-nav__item i { font-size: 1.05rem !important; }

  .ga-sidebar-foot {
    flex-direction: row !important;
    border-top: none !important;
    border-right: 1px solid var(--g-border, rgba(255,255,255,.08)) !important;
    flex-shrink: 0 !important;
    padding: 8px 10px !important;
  }
  .ga-mini-link span { display: none !important; }
  .ga-mini-link { min-width: 36px !important; min-height: 36px !important; justify-content: center !important; }

  /* المنطقة الرئيسية */
  .ga-main { padding: 14px !important; }

  /* الرأس العلوي */
  .ga-topbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
    align-items: center !important;
  }
  .ga-topbar > div:first-child { flex: 1 1 auto; min-width: 0; }
  .ga-topbar h1 { font-size: 1.1rem !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ga-breadcrumb { display: none !important; }
  .ga-userbox { padding: 6px 10px !important; }
  .ga-userbox__name { display: none !important; }
  .ga-userbox__role { display: none !important; }

  /* بطاقات الإحصائيات */
  .ga-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
  }
  .ga-stat-card { padding: 12px !important; }
  .ga-stat-card__icon { width: 32px !important; height: 32px !important; font-size: .88rem !important; top: 12px !important; left: 12px !important; }
  .ga-stat-card__num { font-size: 1.35rem !important; margin-top: 26px !important; }
  .ga-stat-card__lbl { font-size: .72rem !important; line-height: 1.3; }

  /* الصفوف والأعمدة */
  .ga-row, .ga-row--2, .ga-row--3, .ga-row--4 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .ga-col-2 { grid-column: auto !important; }
  .ga-panel { padding: 14px !important; }
  .ga-panel__head { margin-bottom: 12px !important; padding-bottom: 10px !important; flex-wrap: wrap !important; gap: 6px !important; }
  .ga-panel__head h3 { font-size: .9rem !important; }

  /* الجداول: تمرير أفقي */
  .ga-table-scroll {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin: 0 -14px !important;
    padding: 0 14px !important;
    width: calc(100% + 28px) !important;
  }
  .ga-table-scroll .ga-table { min-width: 580px !important; }
  .ga-table { display: block !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; white-space: nowrap !important; }

  /* جداول KV (تفاصيل الطلب) */
  .ga-kv th { width: 90px !important; font-size: .76rem !important; }
  .ga-kv td { font-size: .82rem !important; word-break: break-word !important; white-space: normal !important; }

  /* الفلاتر والأزرار */
  .ga-filters { gap: 5px !important; flex-wrap: wrap !important; }
  .ga-chip { padding: 5px 10px !important; font-size: .75rem !important; }
  .ga-actions-row { flex-wrap: wrap !important; gap: 8px !important; }
  .ga-actions-row .ga-btn { flex: 1 1 auto !important; min-width: 0 !important; justify-content: center !important; }
  .ga-btn { min-height: 42px !important; }
  .ga-btn--small { min-height: 34px !important; padding: 5px 10px !important; }

  /* الفورمات */
  .ga-input, select.ga-input { font-size: .88rem !important; }
  .ga-mini-stats { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .ga-mini-stats strong { font-size: 1.3rem !important; }
  .ga-mini-stats span   { font-size: .68rem !important; }

  /* Device cols (design settings) */
  .ga-device-col { padding: 12px !important; }

  /* Quick links */
  .ga-quick__item { font-size: .85rem !important; padding: 10px 12px !important; }

  /* Flash message */
  .ga-flash { font-size: .82rem !important; padding: 11px 12px !important; }

  /* Type picker */
  .ga-type-picker { grid-template-columns: 1fr !important; }
}

/* ══════════ ≤ 480px — Small phones ══════════ */
@media (max-width: 480px) {
  /* Top bar */
  .top-bar__msg { display: none; }
  .top-bar__inner { justify-content: center; }

  /* Hero */
  .hero__title { font-size: clamp(1.4rem, 8vw, 1.9rem) !important; }
  .hero__visual { height: clamp(200px, 58vw, 280px); }
  .gift-card { width: clamp(115px, 36vw, 175px); height: clamp(72px, 22vw, 110px); }
  .gift-card .gc-amount { font-size: clamp(.95rem, 4.5vw, 1.4rem); }

  /* Grids */
  .products-grid, .categories-grid, .features-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 18px !important; }
  .footer-about { grid-column: auto !important; }

  /* Product card */
  .product-card__body  { padding: 8px !important; gap: 4px !important; }
  .product-card__title { font-size: .76rem !important; }
  .product-card__price .price-now { font-size: .86rem !important; }
  .product-card__btn   { width: 30px; height: 30px; font-size: .75rem; }
  .product-badge       { font-size: .6rem; padding: 2px 6px; top: 6px; right: 6px; }

  /* Category card */
  .category-card { padding: 10px 8px !important; }
  .category-card__icon { width: 36px !important; height: 36px !important; font-size: 1rem !important; }
  .category-card h3 { font-size: .74rem !important; }
  .category-card .arrow { display: none; }

  /* Buttons */
  .btn-lg { padding: 11px 16px; font-size: .9rem; }
  .btn { min-height: 44px; }

  /* Trust */
  .trust-stats { grid-template-columns: repeat(2, 1fr) !important; gap: 6px !important; }
  .trust-stat strong { font-size: 1.25rem !important; }

  /* ── Account page ── */
  .g-account-nav a { padding: 6px 10px !important; font-size: .7rem !important; }
  .g-account-nav a i { font-size: .68rem !important; }
  .g-account-pane .g-cards-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .g-products-grid, .g-wishlist-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .g-badges-grid { grid-template-columns: repeat(3, 1fr) !important; }

  /* ── Admin panel ── */
  .ga-stats { grid-template-columns: 1fr !important; }
  .ga-stat-card__num { font-size: 1.6rem !important; margin-top: 32px !important; }
  .ga-topbar h1 { font-size: 1rem !important; }
  .ga-userbox__avatar { width: 30px !important; height: 30px !important; }
  .ga-brand-mark { width: 26px !important; height: 26px !important; }
}

/* ══════════ ≤ 360px — Very small phones ══════════ */
@media (max-width: 360px) {
  .container { padding-inline: 10px; }

  .hero__title { font-size: 1.3rem !important; }
  .hero__visual { height: 180px; }
  .gift-card { width: 105px; height: 66px; padding: .45rem; border-radius: 8px; }
  .gift-card .gc-amount { font-size: .9rem; }
  .gift-card .gc-chip { display: none; }

  .products-grid { grid-template-columns: 1fr !important; }
  .features-grid { grid-template-columns: 1fr !important; }
  .categories-grid { grid-template-columns: repeat(2, 1fr) !important; }

  .site-title { font-size: .9rem; }
  .site-title .logo-mark { width: 28px; height: 28px; font-size: .9rem; }
  .btn-lg { padding: 10px 14px; font-size: .85rem; }

  /* Account */
  .g-account-main { padding: 12px 10px 70px !important; }
  .g-account-pane .g-cards-4 { grid-template-columns: repeat(2, 1fr) !important; gap: 6px !important; }
  .g-account-nav a { padding: 5px 8px !important; font-size: .66rem !important; }

  /* Admin */
  .ga-nav__item { padding: 7px 9px !important; }
  .ga-main { padding: 10px !important; }
}

/* ══════════ Landscape phones ══════════ */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .hero { padding: 18px 0 !important; }
  .hero__visual { display: none; }
  .hero__title { font-size: 1.4rem !important; }
  .section { padding: 28px 0; }
  .g-account-side { position: relative !important; top: 0 !important; }
  .ga-sidebar { position: relative !important; }
}

/* ─────────────────────────────────────────────────────────────
   MOBILE DRAWER NAVIGATION
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .main-navigation.is-open {
    display: block !important;
    position: fixed;
    top: 0; bottom: 0; right: 0;
    width: min(300px, 85vw);
    background: var(--g-bg, #0A0B14);
    padding: 20px 14px;
    overflow-y: auto;
    z-index: 9200;
    box-shadow: -8px 0 36px rgba(0,0,0,.55);
    border-left: 1px solid var(--g-border, rgba(255,255,255,.08));
    animation: slideInFromRight .2s ease;
  }
  .main-navigation.is-open::before {
    content: '';
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(3px);
    z-index: -1;
  }
  @keyframes slideInFromRight {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
  }
  .main-navigation.is-open #primary-menu {
    display: flex !important; flex-direction: column !important;
    align-items: stretch !important; gap: 4px !important;
    padding: 0; margin: 0; list-style: none;
  }
  .main-navigation.is-open #primary-menu > li > a {
    display: flex !important; align-items: center;
    justify-content: space-between;
    padding: 13px 14px; border-radius: 10px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--g-border, rgba(255,255,255,.08));
    color: #fff !important; font-size: .92rem; font-weight: 600; text-decoration: none;
  }
  .main-navigation.is-open #primary-menu .g-mega-menu {
    position: static !important; display: none !important;
    background: transparent; border: none; box-shadow: none;
    padding: 4px 0 0; max-height: none; min-width: 0;
  }
  .main-navigation.is-open #primary-menu .menu-item-has-children.is-expanded .g-mega-menu {
    display: flex !important; flex-direction: column !important; gap: 2px;
  }
  .main-navigation.is-open #primary-menu .g-mega-menu a {
    display: flex !important; align-items: center;
    padding: 10px 12px; margin-inline-start: 12px;
    background: rgba(255,255,255,.02);
    border: 1px solid rgba(255,255,255,.04);
    border-radius: 8px; font-size: .82rem;
    color: var(--g-text-soft, #B6BBD3) !important;
  }
}

/* ─────────────────────────────────────────────────────────────
   VISUAL POLISH (all sizes)
   ───────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

.product-card {
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  will-change: transform;
}
.product-card:hover  { transform: translateY(-4px); }
.category-card       { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.category-card:hover { transform: translateY(-3px); }

/* ─────────────────────────────────────────────────────────────
   ACCESSIBILITY
   ───────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .gift-card, .trust-orbit, *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* Touch targets */
@media (pointer: coarse) {
  .ga-nav__item, .ga-btn, .ga-mini-link,
  .ga-quick__item, .ga-btn-icon { min-height: 44px; }
  .ga-btn--small { min-height: 38px; }
  .g-account-nav a { min-height: 36px; }
}

/* HIGH DPI */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .gift-card { border: 0.5px solid rgba(255,255,255,.15); }
}

/* =============================================================
   CRITICAL OVERRIDES v2.7.1 — يُكتب في النهاية لضمان الأولوية
   يُلغي أي تعارض من main.css
   ============================================================= */

@media (max-width: 768px) {

  /* ── إصلاح القص من اليسار — المشكلة الجذرية ── */
  .g-account-wrap {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  .g-account-main {
    padding: 14px !important;
    overflow: visible !important;         /* إلغاء overflow:hidden القاتل */
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;          /* إلغاء border-radius الذي يقص المحتوى */
    border-left: none !important;
    border-right: none !important;
  }

  .g-account-side {
    position: relative !important;
    top: 0 !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    padding: 12px 14px !important;
    gap: 8px !important;
  }

  /* ── الكروت 2×2 دائماً (يلغي 1fr من 480px في main.css) ── */
  .g-cards-4,
  .g-account-pane .g-cards-4 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .g-cards-4 .g-card,
  .g-account-pane .g-cards-4 .g-card {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 10px !important;
    text-align: center !important;
    overflow: hidden !important;
  }

  .g-cards-4 .g-card i  { font-size: 1.3rem !important; margin-bottom: 6px !important; display: block !important; }
  .g-cards-4 .g-card h3 { font-size: .72rem !important; margin: 2px 0 4px !important; line-height: 1.3 !important; }
  .g-cards-4 .g-card p,
  .g-cards-4 .g-card .g-card-value { font-size: .9rem !important; word-break: break-word !important; }
  .g-cards-4 .g-card small { font-size: .65rem !important; display: block !important; margin-top: 2px !important; }

  /* ── Container داخل صفحة الحساب ── */
  .g-account-wrap .container,
  .container.g-account-wrap {
    padding-inline: 0 !important;
  }

  /* ── شريط التنقل ── */
  .g-account-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 5px !important;
    padding: 4px 2px 6px !important;
    list-style: none !important;
    margin: 0 !important;
    width: 100% !important;
  }
  .g-account-nav::-webkit-scrollbar { display: none !important; }
  .g-account-nav li { flex-shrink: 0 !important; list-style: none !important; }
  .g-account-nav a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    padding: 7px 11px !important;
    font-size: .74rem !important;
    border-radius: 20px !important;
    min-height: 34px !important;
  }
  .g-account-nav a i { display: inline !important; font-size: .7rem !important; }

  /* ── g-grid-2 داخل صفحة الحساب ── */
  .g-account-pane .g-grid-2,
  .g-account-main .g-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
  }

  /* ── أي flex row داخل صفحة الحساب قد يتجاوز الشاشة ── */
  .g-account-main [style*="display:flex"],
  .g-account-main [style*="display: flex"] {
    flex-wrap: wrap !important;
    min-width: 0 !important;
  }
}

@media (max-width: 480px) {
  /* إعادة تأكيد 2 أعمدة في الشاشات الصغيرة */
  .g-cards-4,
  .g-account-pane .g-cards-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .g-account-main { padding: 12px !important; }
}
