/* 
 * Global Layout Stylesheet
 * PHP Digital Product, E-pin, SMM, and Balance-Based Sales System
 */

/* Google Fonts Setup */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: rgba(var(--primary-rgb), 0.3);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(var(--card-rgb), 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: all 0.3s ease;
}

.glass-panel:hover {
  border-color: rgba(var(--primary-rgb), 0.25);
  box-shadow: 0 10px 36px 0 rgba(var(--primary-rgb), 0.15);
}

.glass-nav {
  background: rgba(var(--card-rgb), 0.75) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Responsive Cards & Animations */
.product-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-8px);
}

.product-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.product-card:hover::before {
  opacity: 1;
}

/* Custom Buttons overrides */
.btn-primary-custom {
  background-color: var(--button-color);
  color: #fff;
  border: 1px solid var(--button-color);
  border-radius: 10px;
  font-weight: 600;
  padding: 10px 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.35);
}

.btn-primary-custom:hover {
  background-color: transparent;
  color: var(--primary-color);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.5);
  transform: translateY(-2px);
}

/* Badges & Glowing Labels */
.badge-glow-green {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.badge-glow-red {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.badge-glow-orange {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

/* Glow animation for API/auto badges */
@keyframes glow-pulse {
  0% { box-shadow: 0 0 5px rgba(var(--primary-rgb), 0.3); }
  50% { box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.6); }
  100% { box-shadow: 0 0 5px rgba(var(--primary-rgb), 0.3); }
}

.pulse-primary {
  animation: glow-pulse 2s infinite ease-in-out;
  border: 1px solid var(--primary-color);
}

/* Hero Section Gradients */
.hero-glow-bg {
  position: relative;
}

.hero-glow-bg::after {
  content: '';
  position: absolute;
  top: 10%;
  left: 20%;
  width: 300px;
  height: 300px;
  background: var(--primary-color);
  filter: blur(130px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.hero-glow-bg::before {
  content: '';
  position: absolute;
  bottom: 15%;
  right: 15%;
  width: 250px;
  height: 250px;
  background: var(--button-color);
  filter: blur(110px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* Custom form styles */
.form-glass {
  background: rgba(var(--bg-rgb), 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-color) !important;
  border-radius: 10px;
  padding: 12px;
}

.form-glass:focus {
  background: rgba(var(--bg-rgb), 0.6);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.25);
  color: var(--text-color);
}

/* Arabic RTL overrides */
body[dir="rtl"] {
  text-align: right;
}
body[dir="rtl"] .ms-auto {
  margin-right: auto !important;
  margin-left: 0 !important;
}
body[dir="rtl"] .me-auto {
  margin-left: auto !important;
  margin-right: 0 !important;
}
