/* جميع الألوان البارزة في هذا الملف ترث لون القالب النشط. */
:root {
  --wfx-success: var(--wfx-p);
  --wfx-danger: var(--wfx-p);
  --wfx-warning: var(--wfx-p);
}

/* ══════════════════════════════════════════
   FONTS & TOKENS
══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
  --v4-bg:      var(--wfx-card);
  --v4-panel:   var(--wfx-card);
  --v4-panel2:  var(--wfx-card);
  --v4-line:    var(--wfx-card);
  --v4-text:    var(--wfx-muted);
  --v4-soft:    var(--wfx-muted);
  --v4-muted:   var(--wfx-p);
  --v4-purple:  var(--wfx-p);
  --v4-purple2: var(--wfx-p);
  --v4-cyan:    var(--wfx-p);
  --v4-green:   var(--wfx-p);
  --v4-orange:  var(--wfx-p);
  --v4-red:     var(--wfx-p);
}

/* ══════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 78% -5%, color-mix(in srgb, var(--wfx-card) 33%, transparent), transparent 30%),
    radial-gradient(circle at 5% 42%,  color-mix(in srgb, var(--wfx-card) 13%, transparent), transparent 28%),
    var(--v4-bg) !important;
  color: var(--v4-text) !important;
  font-family: 'IBM Plex Sans Arabic', 'Cairo', sans-serif !important;
}

/* ══════════════════════════════════════════
   HEADER
══════════════════════════════════════════ */
.wfx-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 40 !important;
  background: color-mix(in srgb, var(--wfx-card) 91%, transparent) !important;
  border-bottom: 1px solid var(--wfx-card) !important;
  backdrop-filter: blur(18px) !important;
}

.wfx-header-main {
  max-width: 1240px !important;
  margin: auto !important;
  padding: 16px clamp(16px, 4vw, 58px) !important;
}

.wfx-brand-name {
  font: 800 18px/1 'DM Sans', 'IBM Plex Sans Arabic', sans-serif !important;
  letter-spacing: -0.05em !important;
  color: var(--wfx-txt) !important;
}

.wfx-brand-sub  { color: var(--v4-soft) !important; }

.wfx-brand-icon {
  background: linear-gradient(140deg, var(--wfx-p), var(--wfx-p)) !important;
  box-shadow: 0 0 24px color-mix(in srgb, var(--wfx-p) 47%, transparent) !important;
}

.wfx-nav-btn {
  color: var(--wfx-muted) !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
}

.wfx-nav-btn:hover,
.wfx-nav-btn.active {
  color: var(--wfx-txt) !important;
  background: linear-gradient(100deg, var(--wfx-p), var(--wfx-card)) !important;
  border-color: var(--wfx-p) !important;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--wfx-p) 27%, transparent) !important;
}

/* ══════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════ */
.wfx-main-content {
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding: 0 clamp(16px, 4vw, 58px) !important;
}

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.wfx-hero {
  position: relative !important;
  isolation: isolate !important;
  min-height: 310px !important;
  padding: clamp(28px, 5vw, 52px) !important;
  border: 1px solid var(--wfx-card) !important;
  border-radius: 26px !important;
  background: linear-gradient(112deg, var(--wfx-card), var(--wfx-card) 68%, var(--wfx-card)) !important;
  box-shadow: 0 22px 55px color-mix(in srgb, var(--wfx-card) 40%, transparent) !important;
  overflow: hidden !important;
}

.wfx-hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 380px;
  height: 380px;
  left: -140px;
  bottom: -250px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--wfx-p) 16%, transparent);
  box-shadow: 190px -80px 0 color-mix(in srgb, var(--wfx-p) 15%, transparent), 430px 110px 0 color-mix(in srgb, var(--wfx-p) 13%, transparent);
  filter: blur(4px);
}

.wfx-hero-title {
  font: 800 clamp(34px, 6vw, 66px) / 1.12 'DM Sans', 'IBM Plex Sans Arabic', sans-serif !important;
  letter-spacing: -0.08em !important;
  color: var(--wfx-txt) !important;
}

.wfx-hero-title em {
  color: var(--wfx-txt) !important;
  text-shadow: 0 0 20px color-mix(in srgb, var(--wfx-p) 40%, transparent);
}

.wfx-hero-subtitle {
  max-width: 560px !important;
  color: var(--wfx-muted) !important;
  font-size: 14px !important;
  line-height: 2 !important;
}

.wfx-hero-kicker {
  color: var(--wfx-txt) !important;
  font: 600 10px 'IBM Plex Mono', monospace !important;
  letter-spacing: 0.14em !important;
}

.wfx-hero-actions .wfx-btn {
  min-height: 48px !important;
  padding: 13px 20px !important;
}

.wfx-hero-visual {
  filter: drop-shadow(0 20px 36px color-mix(in srgb, var(--wfx-card) 27%, transparent)) !important;
}

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.wfx-btn {
  border-radius: 12px !important;
  font-weight: 700 !important;
  transition: transform 0.16s, filter 0.16s, box-shadow 0.16s !important;
}

.wfx-btn.primary,
.wfx-product-buy {
  background: linear-gradient(100deg, var(--wfx-p), var(--wfx-p)) !important;
  border: 1px solid var(--wfx-p) !important;
  color: var(--wfx-txt) !important;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--wfx-p) 26%, transparent) !important;
}

.wfx-btn.primary:hover,
.wfx-product-buy:hover {
  filter: brightness(1.12) !important;
  transform: translateY(-2px) !important;
}

.wfx-btn.ghost {
  background: var(--wfx-card) !important;
  border: 1px solid var(--wfx-card) !important;
  color: var(--wfx-muted) !important;
}

/* ══════════════════════════════════════════
   STATS
══════════════════════════════════════════ */
.wfx-stats {
  display: grid !important;
  grid-template-columns: 1.5fr repeat(3, 1fr) !important;
  gap: 12px !important;
  margin: 16px 0 !important;
}

.wfx-stat {
  min-height: 88px !important;
  padding: 17px !important;
  background: linear-gradient(145deg, var(--wfx-card), var(--wfx-card)) !important;
  border: 1px solid var(--wfx-card) !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 24px color-mix(in srgb, var(--wfx-card) 22%, transparent) !important;
}

.wfx-stat:first-child {
  background: linear-gradient(135deg, var(--wfx-p), var(--wfx-p)) !important;
  border-color: var(--wfx-p) !important;
}

.wfx-stat-val {
  color: var(--wfx-txt) !important;
  font: 700 25px 'DM Sans', 'IBM Plex Sans Arabic', sans-serif !important;
}

.wfx-stat-lbl { color: var(--wfx-muted) !important; font-size: 11px !important; }
.wfx-stat-fa  { color: var(--v4-purple2) !important; }

/* ══════════════════════════════════════════
   CARDS
══════════════════════════════════════════ */
.wfx-card {
  padding: 22px !important;
  background: linear-gradient(145deg, color-mix(in srgb, var(--wfx-card) 87%, transparent), color-mix(in srgb, var(--wfx-card) 93%, transparent)) !important;
  border: 1px solid var(--wfx-card) !important;
  border-radius: 20px !important;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--wfx-card) 21%, transparent) !important;
}

.wfx-card h2 {
  margin: 0 0 18px !important;
  color: var(--wfx-muted) !important;
  font: 700 20px 'DM Sans', 'IBM Plex Sans Arabic', sans-serif !important;
}

/* ══════════════════════════════════════════
   PRODUCTS
══════════════════════════════════════════ */
.wfx-products {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
  gap: 18px !important;
}

.wfx-product {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  overflow: hidden !important;
  background: linear-gradient(145deg, color-mix(in srgb, var(--wfx-card) 80%, transparent), color-mix(in srgb, var(--wfx-card) 87%, transparent)) !important;
  border: 1px solid var(--wfx-card) !important;
  border-radius: 20px !important;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--wfx-card) 21%, transparent) !important;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s !important;
}

.wfx-product:hover {
  transform: translateY(-5px) !important;
  border-color: var(--wfx-p) !important;
  box-shadow: 0 20px 42px color-mix(in srgb, var(--wfx-card) 40%, transparent), 0 0 18px color-mix(in srgb, var(--wfx-p) 15%, transparent) !important;
}

/* ── Product Visual ── */
.wfx-product-visual {
  min-height: 170px !important;
  padding: 15px !important;
  background: linear-gradient(180deg, var(--wfx-card), var(--wfx-card)) !important;
}

.wfx-product-image-frame {
  height: 145px !important;
  background: var(--wfx-card) !important;
  border: 1px solid var(--wfx-card) !important;
  border-radius: 15px !important;
}

.wfx-product-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  padding: 12px !important;
}

/* ── Product Body ── */
.wfx-product-body {
  display: flex !important;
  flex: 1 !important;
  flex-direction: column !important;
  padding: 18px !important;
}

.wfx-product-title {
  min-height: 52px !important;
  color: var(--wfx-muted) !important;
  font: 700 16px/1.6 'IBM Plex Sans Arabic', sans-serif !important;
}

.wfx-product-price {
  color: var(--wfx-txt) !important;
  font: 700 25px 'DM Sans', 'IBM Plex Sans Arabic', sans-serif !important;
}

.wfx-product-price span { color: var(--wfx-muted) !important; }

.wfx-product-bottom {
  margin-top: auto !important;
  padding-top: 14px !important;
  border-top: 1px solid var(--wfx-card) !important;
}

.wfx-product-buy {
  width: 100% !important;
  justify-content: center !important;
}

/* ── Product Icon ── */
.wfx-product-icon {
  background: linear-gradient(145deg, var(--wfx-card), var(--wfx-card)) !important;
  border-color: var(--wfx-p) !important;
  color: var(--wfx-txt) !important;
  box-shadow: 0 0 22px color-mix(in srgb, var(--wfx-p) 13%, transparent) !important;
}

/* ══════════════════════════════════════════
   BADGES
══════════════════════════════════════════ */
.wfx-badge { border-radius: 999px !important; }

.wfx-badge.good,
.wfx-badge.success {
  background: var(--wfx-card) !important;
  color: var(--wfx-p) !important;
  border-color: var(--wfx-p) !important;
}

.wfx-badge.warn,
.wfx-badge.warning {
  background: var(--wfx-card) !important;
  color: var(--wfx-p) !important;
  border-color: var(--wfx-p) !important;
}

.wfx-badge.bad {
  background: var(--wfx-card) !important;
  color: var(--wfx-p) !important;
  border-color: var(--wfx-p) !important;
}

/* ══════════════════════════════════════════
   FORM INPUTS
══════════════════════════════════════════ */
.wfx-input,
input,
select,
textarea {
  background: var(--wfx-card) !important;
  border: 1px solid var(--wfx-card) !important;
  color: var(--wfx-muted) !important;
  border-radius: 10px !important;
}

.wfx-input:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--wfx-p) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wfx-p) 13%, transparent) !important;
}

/* ══════════════════════════════════════════
   PAYMENT GRID
══════════════════════════════════════════ */
.wfx-pay-grid { gap: 12px !important; }

.wfx-pay-item {
  background: linear-gradient(145deg, var(--wfx-card), var(--wfx-card)) !important;
  border: 1px solid var(--wfx-card) !important;
  border-radius: 18px !important;
  color: var(--wfx-muted) !important;
}

.wfx-pay-item i { color: var(--v4-purple2) !important; }

/* ══════════════════════════════════════════
   ORDER PREVIEW
══════════════════════════════════════════ */
.wfx-order-preview a {
  display: block !important;
  margin-top: 14px !important;
  padding: 12px 14px !important;
  border-radius: 12px !important;
  background: linear-gradient(100deg, var(--wfx-p), var(--wfx-p)) !important;
  border: 1px solid var(--wfx-p) !important;
  color: var(--wfx-txt) !important;
  text-decoration: none !important;
  text-align: center !important;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--wfx-p) 26%, transparent) !important;
}

.wfx-order-preview a:hover {
  filter: brightness(1.12) !important;
  transform: translateY(-2px) !important;
}

.wfx-order-preview-head > i {
  background: var(--wfx-p) !important;
  color: var(--wfx-card) !important;
}

/* ══════════════════════════════════════════
   NEON TEXT
══════════════════════════════════════════ */
.neon-text-primary,
.neon-text-purple {
  color: var(--wfx-txt) !important;
  text-shadow: 0 0 18px color-mix(in srgb, var(--wfx-p) 27%, transparent) !important;
}

/* ══════════════════════════════════════════
   GOLD PRO OVERRIDES
══════════════════════════════════════════ */
.wfx-gold-pro .wfx-btn.primary,
.wfx-gold-pro .wfx-btn.primary:hover,
.wfx-gold-pro .wfx-product-buy,
.wfx-gold-pro .wfx-product-buy:hover {
  background: linear-gradient(100deg, var(--wfx-p), var(--wfx-p)) !important;
  border-color: var(--wfx-p) !important;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--wfx-p) 26%, transparent) !important;
  color: var(--wfx-txt) !important;
}

/* Inline style overrides */
.wfx-product-buy[style],
.wfx-hero-actions .wfx-btn[style] {
  background: linear-gradient(100deg, var(--wfx-p), var(--wfx-p)) !important;
  border-color: var(--wfx-p) !important;
}

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.wfx-site-footer {
  border-top: 1px solid var(--wfx-card) !important;
  color: var(--wfx-p) !important;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 930px) {
  .wfx-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .wfx-stat:first-child {
    grid-column: span 2;
  }
}

@media (max-width: 700px) {
  .wfx-header-main  { padding: 14px 16px !important; }
  .wfx-main-content { padding: 0 16px !important; }

  .wfx-hero {
    min-height: 330px !important;
    padding: 28px 23px !important;
    border-radius: 18px !important;
  }

  .wfx-hero-title { font-size: 39px !important; }

  .wfx-stats   { gap: 7px !important; }
  .wfx-stat    { min-height: 76px !important; padding: 11px !important; }
  .wfx-stat-val { font-size: 20px !important; }

  .wfx-products { grid-template-columns: 1fr !important; gap: 12px !important; }

  .wfx-card,
  .wfx-product { border-radius: 16px !important; }

  .wfx-pay-grid { grid-template-columns: 1fr !important; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════════
   STOREFRONT STATISTICS — BALANCED LAYOUT
   Featured orders card + equal supporting metrics
══════════════════════════════════════════ */
.wfx-stats.premium {
  grid-template-columns: minmax(250px, 1.45fr) repeat(3, minmax(150px, 1fr)) !important;
  gap: 12px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.wfx-stat.premium {
  position: relative;
  display: block !important;
  min-height: 118px !important;
  padding: 18px !important;
  overflow: hidden;
  border: 1px solid var(--wfx-border) !important;
  border-radius: 20px !important;
  background: linear-gradient(145deg, var(--wfx-card), color-mix(in srgb, var(--wfx-card) 88%, var(--wfx-p))) !important;
  box-shadow: 0 10px 25px color-mix(in srgb, var(--wfx-bg) 30%, transparent) !important;
}

.wfx-stat.premium::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  left: -50px;
  bottom: -64px;
  border-radius: 50%;
  pointer-events: none;
  background: color-mix(in srgb, var(--wfx-p) 10%, transparent);
}

.wfx-stat.premium:first-child {
  display: grid !important;
  grid-template-columns: auto 1fr;
  align-content: center;
  column-gap: 12px;
  min-height: 118px !important;
  background: linear-gradient(135deg, var(--wfx-p), color-mix(in srgb, var(--wfx-p) 82%, var(--wfx-card))) !important;
  border-color: var(--wfx-p) !important;
}

.wfx-stat.premium:first-child::after {
  width: 180px;
  height: 180px;
  left: -55px;
  bottom: -100px;
  background: color-mix(in srgb, var(--wfx-txt) 13%, transparent);
}

.wfx-stat-val.premium {
  position: relative;
  z-index: 1;
  display: flex !important;
  align-items: center;
  gap: 10px;
  color: var(--wfx-txt) !important;
  font-size: clamp(23px, 2vw, 30px) !important;
  line-height: 1.1;
}

.wfx-stat.premium .wfx-stat-fa {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 13px;
  color: var(--wfx-p) !important;
  background: color-mix(in srgb, var(--wfx-p) 13%, transparent);
  font-size: 17px;
}

.wfx-stat.premium:first-child .wfx-stat-fa {
  color: var(--wfx-txt) !important;
  background: color-mix(in srgb, var(--wfx-txt) 16%, transparent);
}

.wfx-stat-lbl {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 9px;
  color: var(--wfx-muted) !important;
  font-size: 11px !important;
  font-weight: 800;
}

.wfx-stat.premium:first-child .wfx-stat-lbl {
  align-self: center;
  margin: 0;
  color: color-mix(in srgb, var(--wfx-txt) 72%, transparent) !important;
}

@media (max-width: 930px) {
  .wfx-stats.premium { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .wfx-stat.premium:first-child { grid-column: span 2; }
}

@media (max-width: 700px) {
  .wfx-stats.premium {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin: 14px 0 18px !important;
  }

  .wfx-stat.premium {
    min-height: 112px !important;
    padding: 15px !important;
    border-radius: 18px !important;
  }

  .wfx-stat.premium:first-child,
  .wfx-stat.premium:last-child { grid-column: span 2; }

  .wfx-stat.premium:first-child { min-height: 106px !important; }

  .wfx-stat-val.premium { gap: 8px; font-size: 25px !important; }

  .wfx-stat.premium .wfx-stat-fa {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 12px;
  }
}
