/* ══════════════════════════════════════════
   TOKENS
══════════════════════════════════════════ */
:root {
  --wfx-text:    var(--wfx-txt, #f4f7ff);
  --wfx-muted:   color-mix(in srgb, var(--wfx-txt, #f4f7ff) 70%, var(--wfx-bg, #0f1b31));
  --wfx-text2:   color-mix(in srgb, var(--wfx-txt, #f4f7ff) 86%, var(--wfx-bg, #0f1b31));
  --wfx-text3:   color-mix(in srgb, var(--wfx-txt, #f4f7ff) 72%, var(--wfx-bg, #0f1b31));

  --grad-btn:    var(--wfx-p, #c9a227);
  --glow-sm:     0 12px 32px var(--wfx-glow, rgba(201, 162, 39, 0.28));

  --wfx-success: var(--wfx-p);
  --wfx-danger:  var(--wfx-p);
  --wfx-warning: var(--wfx-p);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  color: var(--wfx-txt);
  background: var(--wfx-bg);
  font-family: var(--wfx-font, 'Cairo', sans-serif);
  -webkit-font-smoothing: antialiased;
}

/* Grid overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.15;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}

/* Ambient glow */
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 480px;
  height: 480px;
  right: -160px;
  top: -210px;
  border-radius: 50%;
  background: var(--wfx-p);
  opacity: 0.13;
  filter: blur(110px);
  pointer-events: none;
}

a { color: inherit; }

button,
input,
select,
textarea { font: inherit; }

i[class*="fa-"] { line-height: 1; }

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

.wfx-header-main {
  width: min(1180px, calc(100% - 40px));
  height: 80px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* ── Brand ── */
.wfx-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  min-width: 0;
}

.wfx-brand-icon,
.wfx-brand-logo-img {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--wfx-p) 38%, transparent);
  background: var(--wfx-p);
  color: var(--wfx-txt);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--wfx-p) 26%, transparent);
  object-fit: cover;
}

.wfx-brand-icon { font-size: 20px; }

.wfx-brand-text {
  display: grid;
  line-height: 1.35;
  min-width: 0;
}

.wfx-brand-name {
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.wfx-brand-sub {
  font-size: 10px;
  font-weight: 600;
  color: var(--wfx-text3) !important;
  white-space: nowrap;
}

/* ── Header Actions ── */
.wfx-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Desktop Nav ── */
.wfx-nav-desktop {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--wfx-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.wfx-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--wfx-text2) !important;
  font-size: 12px;
  font-weight: 800;
  transition: 0.2s;
}

.wfx-nav-btn:hover,
.wfx-nav-btn.active {
  color: var(--wfx-txt) !important;
  background: color-mix(in srgb, var(--wfx-p) 14%, transparent);
}

/* ── Mobile Toggle ── */
.wfx-menu-toggle {
  width: 42px !important;
  height: 42px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid var(--wfx-border) !important;
  border-radius: 12px !important;
  background: var(--wfx-card2) !important;
  color: var(--wfx-txt) !important;
}

/* ── Pages Menu (mobile dropdown) ── */
.wfx-pages-menu {
  display: none;
  position: absolute;
  top: 72px;
  left: max(20px, calc((100vw - 1180px) / 2));
  min-width: 230px;
  padding: 8px;
  border: 1px solid var(--wfx-border);
  border-radius: 15px;
  background: var(--wfx-card);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.wfx-pages-menu.open {
  display: block;
  animation: wfxFade 0.18s ease;
}

.wfx-pages-menu-inner {
  display: grid;
  gap: 3px;
}

.wfx-pages-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 9px;
  color: var(--wfx-text2) !important;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.wfx-pages-menu-item:hover,
.wfx-pages-menu-item.active {
  color: var(--wfx-txt) !important;
  background: color-mix(in srgb, var(--wfx-p) 10%, transparent);
}

/* ══════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════ */
.wfx-main-content {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  padding: 46px 0 0;
}

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.wfx-site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 72px auto 0 !important;
  padding: 30px 0 38px !important;
  border-top: 1px solid var(--wfx-border) !important;
}

.wfx-footer-pay span {
  color: var(--wfx-muted) !important;
  opacity: 1 !important;
}

.wfx-footer-socials a {
  color: var(--wfx-p) !important;
  background: color-mix(in srgb, var(--wfx-p) 7%, transparent) !important;
  border-color: color-mix(in srgb, var(--wfx-p) 20%, transparent) !important;
}

.wfx-footer-copy {
  color: var(--wfx-muted) !important;
  font-size: 11px !important;
}

/* ══════════════════════════════════════════
   CONTRAST: SECONDARY TEXT
══════════════════════════════════════════ */
.wfx-stat-lbl,
.wfx-product-price span,
.wfx-pay-item small,
.wfx-note,
.wfx-status,
.wfx-modal-card p { color: var(--wfx-text3) !important; }

.wfx-label,
.wfx-table th,
.wfx-table td { color: var(--wfx-text2) !important; }

/* ── Form placeholders & values ── */
.wfx-input::placeholder,
input::placeholder,
textarea::placeholder,
select::placeholder {
  color: var(--wfx-text3) !important;
  opacity: 1;
}

.wfx-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea { color: var(--wfx-text) !important; }

/* ══════════════════════════════════════════
   ANIMATION
══════════════════════════════════════════ */
@keyframes wfxFade {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: none; }
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 760px) {
  .wfx-header-main,
  .wfx-main-content,
  .wfx-site-footer { width: min(calc(100% - 28px), 1180px); }

  .wfx-header-main  { height: 70px; }
  .wfx-nav-desktop  { display: none; }
  .wfx-brand-sub    { display: none; }

  .wfx-brand-icon,
  .wfx-brand-logo-img { width: 40px; height: 40px; border-radius: 12px; }

  .wfx-pages-menu   { left: 14px; right: 14px; top: 63px; }
  .wfx-main-content { padding-top: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
