/* ==========================================================================
   ZoneCard - Modern Sleek Dark Gaming Theme (تصميم داكن، عصري وفاخر)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

:root {
  --font-arabic: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Dark Gaming Theme Palette */
  --bg-main: #0a0e17;
  --bg-surface: #111827;
  --bg-surface-muted: #1a2236;
  
  --border-subtle: #1f293d;
  --border-medium: #334155;
  --border-focus: #3b82f6;

  /* Brand Accents */
  --brand-blue: #3b82f6;
  --brand-blue-hover: #2563eb;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --success: #10b981;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-arabic);
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0a0e17;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Dark Gaming Product Card */
.product-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
}
.product-card:hover {
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.15);
}

/* Buttons */
.btn-primary {
  background-color: var(--brand-blue);
  color: #ffffff;
  font-weight: 700;
  border-radius: 0.65rem;
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.btn-primary:hover {
  background-color: var(--brand-blue-hover);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}
.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background-color: #1a2236;
  border: 1px solid var(--border-subtle);
  color: #e2e8f0;
  font-weight: 600;
  border-radius: 0.65rem;
  transition: all 0.15s ease;
}
.btn-secondary:hover {
  background-color: #242f49;
  border-color: #334155;
  color: #ffffff;
}

/* Selectable Chips inside Modal (Region & Denominations) */
.chip-btn {
  background-color: #161f30;
  border: 1.5px solid var(--border-subtle);
  color: #cbd5e1;
  border-radius: 0.65rem;
  transition: all 0.15s ease;
  cursor: pointer;
}
.chip-btn:hover {
  border-color: #3b82f6;
  background-color: #1e293b;
  color: #ffffff;
}
.chip-btn.active {
  background-color: rgba(59, 130, 246, 0.18);
  border-color: var(--brand-blue);
  color: #60a5fa;
  font-weight: 700;
}

/* Code Voucher Box */
.voucher-code-box {
  background-color: #0b0f19;
  border: 1.5px dashed #334155;
  border-radius: 0.75rem;
  font-family: 'Consolas', 'Courier New', monospace;
  color: #38bdf8;
}

/* Drawer Transitions */
.drawer-content {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
/* ==========================================================================
   Mobile / iPhone Responsiveness
   ========================================================================== */
@media (max-width: 640px) {
  input, select, textarea {
    font-size: 16px !important;
  }
  button, .btn-primary, .btn-secondary, .chip-btn {
    min-height: 40px;
  }
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  #cart-drawer {
    width: 100vw !important;
  }
  #product-detail-modal > div,
  #checkout-modal > div,
  #order-success-modal > div {
    max-width: 100vw;
    max-height: 95vh;
    border-radius: 1rem;
  }
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  #toast-container {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
  #category-filter-chips button {
    padding: 8px 12px;
    font-size: 12px;
  }
  #products-grid {
    gap: 0.75rem;
  }
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
* {
  -webkit-tap-highlight-color: transparent;
}
@supports (padding: env(safe-area-inset-top)) {
  header.sticky {
    padding-top: env(safe-area-inset-top);
  }
}
