/* ===== Key2lix — تصميم احترافي: توكنز موحدة من tokens.css ===== */
@import url('tokens.css');

:root {
  --key2lix-primary: var(--color-primary);
  --key2lix-primary-dark: var(--color-primary-dark);
  --key2lix-primary-light: var(--color-primary-light);
  --key2lix-surface: var(--bg-surface);
  --key2lix-surface-light: var(--bg-surface-light);
  --key2lix-border: var(--border-default);
  --key2lix-border-light: var(--border-light);
  --key2lix-radius: var(--radius);
  --key2lix-radius-sm: var(--radius-sm);
  --key2lix-radius-lg: var(--radius-lg);
  --key2lix-shadow: var(--shadow-default);
  --key2lix-shadow-hover: var(--shadow-hover);
  --key2lix-glow: var(--glow-primary);
  --key2lix-transition: var(--transition);
}

body.theme-light {
  --key2lix-surface: var(--bg-surface);
  --key2lix-border: var(--border-default);
  --key2lix-shadow: var(--shadow-default);
  --key2lix-shadow-hover: var(--shadow-hover);
}

/* ===== إمكانية الوصول: تركيز واضح وتخطيط ===== */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--key2lix-primary, #7c3aed);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--key2lix-primary, #7c3aed);
  outline-offset: 2px;
}

/* استثناء: داخل الحقل فقط الـ input والزر — لا outline ولا box-shadow حتى يبقى إطار الحاوية وحده */
.auth-page .auth-input-group input,
.auth-page .auth-input-group input:focus,
.auth-page .auth-input-group input:focus-visible,
.auth-page .auth-input-group button,
.auth-page .auth-input-group button:focus,
.auth-page .auth-input-group button:focus-visible {
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
}

.skip-link {
  position: absolute;
  top: -50px;
  left: 12px;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
}

/* ===== أساس responsive: منع التمرير الأفقي وتكيف المحتوى ===== */
html {
  box-sizing: border-box;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  overflow-x: hidden;
  margin: 0;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

table {
  width: 100%;
  max-width: 100%;
}

/* ===== عام — خط واحترافية ===== */
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--font-weight-normal);
  color: var(--text-primary);
  letter-spacing: 0.01em;
  line-height: 1.5;

  background: url('/assets/img/background.jpg') no-repeat center center fixed !important;
  background-size: cover !important;
  position: relative;
}

/* طبقة تدرج فوق الخلفية — عمق واحترافية */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(12, 11, 18, 0.72) 0%, rgba(15, 14, 22, 0.82) 40%, rgba(10, 9, 16, 0.88) 100%);
  z-index: -1;
}

/* ===== Light theme ===== */
body.theme-light {
  color: #1e293b;
}

body.theme-light::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 255, 0.95) 50%, rgba(241, 245, 249, 0.97) 100%);
}

body.theme-light .navbar {
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a1a;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .navbar a,
body.theme-light .navbar .dropbtn {
  color: #1a1a1a;
}

body.theme-light .nav-link {
  color: #334155;
}

body.theme-light .nav-link:hover {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
}

body.theme-light .navbar-center input {
  background: #eee;
  color: #111;
}

body.theme-light .nav-search-input {
  background: #f1f5f9;
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, 0.1);
}

body.theme-light .nav-search-input:focus {
  border-color: #7c3aed;
}

body.theme-light .theme-toggle {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.3);
  color: #7c3aed;
}

body.theme-light #search-results {
  background: #fff;
}

body.theme-light #search-results div {
  color: #111;
}

body.theme-light .card,
body.theme-light .product-container,
body.theme-light .form-container {
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a1a;
}

body.theme-light .footer {
  background: rgba(240, 240, 245, 0.95);
  color: #1a1a1a;
}

body.theme-light .footer-col a,
body.theme-light .footer-col p {
  color: #333;
}

body.theme-light .theme-toggle {
  background: #7c3aed;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}

body.theme-light .stats-bar {
  background: rgba(255, 255, 255, 0.95);
}

body.theme-light .stat-item {
  color: #444;
}

body.theme-light .stat-item strong {
  color: #7c3aed;
}

body.theme-light .category-tile {
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a1a;
}

body.theme-light .category-tile:hover {
  border-color: #7c3aed;
}

body.theme-light .home-cat-tile {
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a1a;
}

body.theme-light .home-cat-tile .home-cat-label {
  color: #1a1a1a;
}

body.theme-light .home-cat-tile .cat-hint {
  color: #64748b;
}

body.theme-light .home-card {
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .home-card .card-from {
  color: #64748b;
}

body.theme-light .home-card .card-price .old-price {
  color: #94a3b8;
}

body.theme-light .home-why {
  background: rgba(255, 255, 255, 0.9);
}

body.theme-light .home-why-item span {
  color: #64748b;
}

body.theme-light .home-hero .hero-tagline {
  color: #6d28d9;
}

body.theme-light .home-hero .btn-hero-secondary {
  background: rgba(124, 58, 237, 0.1);
  color: #5b21b6;
  border-color: #7c3aed;
}

body.theme-light .home-card .btn {
  background: #7c3aed;
  color: #fff;
}

body.theme-light .home-card .btn:hover {
  background: #6d28d9;
}

body.theme-light .home-offers {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.2) 100%);
  border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .home-offers-desc {
  color: #64748b;
}

/* ===== وضع التباين العالي (High contrast) — إمكانية وصول ===== */
body.theme-contrast {
  color: #fff !important;
}

body.theme-contrast .navbar,
body.theme-contrast .card,
body.theme-contrast .product-container,
body.theme-contrast .form-container,
body.theme-contrast .home-card,
body.theme-contrast .home-cat-tile,
body.theme-contrast .footer {
  border-width: 2px !important;
  border-color: #fff !important;
}

body.theme-contrast .nav-link,
body.theme-contrast .footer-col a,
body.theme-contrast .footer-col p {
  color: #fff !important;
}

body.theme-contrast .nav-link:hover,
body.theme-contrast a:hover {
  text-decoration: underline;
}

body.theme-contrast input,
body.theme-contrast select,
body.theme-contrast textarea {
  border: 2px solid #fff !important;
  background: #000 !important;
  color: #fff !important;
}

body.theme-contrast :focus-visible {
  outline: 3px solid #ff0 !important;
  outline-offset: 2px !important;
}

body.theme-light.theme-contrast {
  color: #000 !important;
}

body.theme-light.theme-contrast .navbar,
body.theme-light.theme-contrast .card,
body.theme-light.theme-contrast .product-container,
body.theme-light.theme-contrast .form-container,
body.theme-light.theme-contrast .home-card,
body.theme-light.theme-contrast .home-cat-tile,
body.theme-light.theme-contrast .footer {
  border-color: #000 !important;
}

body.theme-light.theme-contrast .nav-link,
body.theme-light.theme-contrast .footer-col a,
body.theme-light.theme-contrast .footer-col p {
  color: #000 !important;
}

body.theme-light.theme-contrast input,
body.theme-light.theme-contrast select,
body.theme-light.theme-contrast textarea {
  border-color: #000 !important;
  background: #fff !important;
  color: #000 !important;
}

body.theme-light.theme-contrast :focus-visible {
  outline-color: #00f !important;
}

/* Back to top (global) — فوق زر key2lix-ai-chat لعدم التداخل */
.back-to-top {
  position: fixed;
  bottom: calc(84px + env(safe-area-inset-bottom));
  left: max(24px, env(safe-area-inset-left));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--key2lix-primary) 0%, var(--key2lix-primary-dark) 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--key2lix-shadow-hover), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: opacity var(--key2lix-transition), transform var(--key2lix-transition);
  z-index: 99998;
}

.back-to-top.visible {
  display: flex !important;
}

.back-to-top:hover {
  transform: scale(1.06) translateY(-2px);
  opacity: 0.98;
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

[dir="rtl"] .back-to-top {
  left: auto;
  right: max(24px, env(safe-area-inset-right));
}

body.theme-light .back-to-top {
  background: #7c3aed;
  color: #fff;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: calc(80px + env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    min-width: 48px;
    min-height: 48px;
  }

  [dir="rtl"] .back-to-top {
    left: auto;
    right: max(12px, env(safe-area-inset-right));
  }
}

/* ===== Bottom Navigation — مخفي (تم حذفه من الهاتف) ===== */
.bottom-nav {
  display: none !important;
}

/* ===== Footer احترافي — أقوى ===== */
.footer {
  position: relative;
  background: linear-gradient(180deg, #0c0c12 0%, #0f0f18 50%, #0a0a10 100%);
  color: #e2e8f0;
  padding: 0 0 0;
  font-size: 0.9375rem;
  backdrop-filter: blur(16px);
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, #7c3aed, #a78bfa, #c4b5fd, #7c3aed) 1;
  box-shadow: 0 -4px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.footer-top-bar {
  height: 6px;
  background: linear-gradient(90deg, transparent 0%, #5b21b6 15%, #7c3aed 35%, #a78bfa 50%, #7c3aed 65%, #5b21b6 85%, transparent 100%);
  background-size: 200% 100%;
  box-shadow: 0 0 32px rgba(124, 58, 237, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 28px;
}

.footer-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 28px 24px;
  margin-bottom: 32px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18) 0%, rgba(88, 28, 135, 0.12) 100%);
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.footer-cta-text {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #e9d5ff;
  text-shadow: 0 0 20px rgba(167, 139, 250, 0.3);
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 14px;
  border: none;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  transition: transform 0.2s, box-shadow 0.2s;
}

.footer-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1fr;
  gap: 44px 36px;
  margin-bottom: 44px;
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 28px;
  }
}

@media (max-width: 768px) {
  .footer-mobile {
    display: block !important;
  }

  .footer-grid {
    display: none !important;
  }

  .footer-newsletter {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .footer-mobile {
    display: none !important;
  }

  .footer-grid {
    display: grid;
  }

  .footer-newsletter {
    display: block;
  }
}

.footer-mobile {
  display: none;
  padding: 0 0 28px;
}

.footer-mobile-top {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
  padding: 20px 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.footer-mobile-top::after {
  content: "";
  position: absolute;
  bottom: -1px;
  inset-inline: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.4), transparent);
  opacity: 0.6;
}

body.theme-light .footer-mobile-top {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.theme-light .footer-mobile-top::after {
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.25), transparent);
}

.footer-mobile-lang {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #f1f5f9;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.12) 0%, rgba(88, 28, 135, 0.06) 100%);
  border: 1px solid rgba(124, 58, 237, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}

.footer-mobile-lang:hover {
  color: #e9d5ff;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.18) 0%, rgba(88, 28, 135, 0.1) 100%);
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.footer-mobile-lang:active {
  transform: translateY(0);
}

.footer-mobile-lang:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.9);
  outline-offset: 2px;
}

.footer-mobile-lang i:first-child {
  opacity: 0.95;
  font-size: 1.05rem;
  color: #a78bfa;
}

.footer-mobile-lang .footer-mobile-chevron {
  font-size: 0.65rem;
  opacity: 0.8;
  margin-inline-start: auto;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-light .footer-mobile-lang {
  color: #1e293b;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.08) 0%, rgba(124, 58, 237, 0.04) 100%);
  border-color: rgba(124, 58, 237, 0.22);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.theme-light .footer-mobile-lang:hover {
  color: #6d28d9;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.12) 0%, rgba(124, 58, 237, 0.06) 100%);
  border-color: rgba(124, 58, 237, 0.35);
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.12);
}

.footer-mobile-payments {
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body.theme-light .footer-mobile-payments {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

.footer-mobile-payments-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.footer-mobile-payments-logos img {
  height: 28px;
  width: auto;
  max-width: 48px;
  object-fit: contain;
  opacity: 0.9;
  filter: grayscale(0.08) contrast(1.02);
  transition: all 0.25s ease;
}

.footer-mobile-payments-logos img:hover {
  opacity: 1;
  filter: grayscale(0) contrast(1.05);
}

.footer-mobile-payments-note {
  color: #94a3b8;
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 14px 0 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.9;
}

body.theme-light .footer-mobile-payments-note {
  color: #64748b;
}

.footer-mobile-accordions {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer-accordion {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: background 0.25s ease;
}

.footer-accordion[open] {
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.06) 0%, transparent 100%);
  border-inline-start: 3px solid rgba(124, 58, 237, 0.6);
  padding-inline-start: 0;
}

body.theme-light .footer-accordion {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.theme-light .footer-accordion[open] {
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.05) 0%, transparent 100%);
  border-inline-start-color: rgba(124, 58, 237, 0.5);
}

.footer-accordion:last-child {
  border-bottom: none;
}

.footer-accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f8fafc;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s, background 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.footer-accordion-summary::-webkit-details-marker {
  display: none;
}

.footer-accordion-summary:hover {
  color: #c4b5fd;
}

.footer-accordion-summary:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.7);
  outline-offset: -2px;
  border-radius: 8px;
}

body.theme-light .footer-accordion-summary {
  color: #0f172a;
}

body.theme-light .footer-accordion-summary:hover {
  color: #6d28d9;
}

.footer-accordion-summary span {
  flex: 1;
}

.footer-accordion-arrow {
  font-size: 0.65rem;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.15);
  color: #a78bfa;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  margin-inline-start: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.footer-accordion[open] .footer-accordion-arrow {
  transform: rotate(180deg);
  background: rgba(124, 58, 237, 0.25);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.25);
}

body.theme-light .footer-accordion-arrow {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
}

body.theme-light .footer-accordion[open] .footer-accordion-arrow {
  background: rgba(124, 58, 237, 0.2);
}

.footer-accordion-links {
  list-style: none;
  padding: 0 0 24px 4px;
  margin: 0;
  padding-inline-start: 0;
}

.footer-accordion-links li {
  margin-bottom: 0;
}

.footer-accordion-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 12px 0;
  padding-inline-start: 12px;
  border-inline-start: 2px solid transparent;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.footer-accordion-links a::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.5);
  opacity: 0;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.footer-accordion-links a:hover {
  color: #c4b5fd;
  border-inline-start-color: rgba(124, 58, 237, 0.4);
}

.footer-accordion-links a:hover::before {
  opacity: 1;
}

.footer-accordion-links li:last-child a {
  border-bottom: none;
}

body.theme-light .footer-accordion-links a {
  color: #64748b;
}

body.theme-light .footer-accordion-links a:hover {
  color: #6d28d9;
}

body.theme-light .footer-accordion-links a::before {
  background: rgba(124, 58, 237, 0.6);
}

.footer-accordion-social {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px 0 28px 4px;
}

.footer-mobile .footer-social-btn {
  width: 48px;
  height: 48px;
  font-size: 1.15rem;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-mobile .footer-social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-inner {
    padding: 0 16px 20px;
  }

  .footer-cta {
    flex-direction: column;
    padding: 18px 16px;
    margin-bottom: 24px;
    gap: 14px;
  }

  .footer-cta-text {
    font-size: 0.95rem;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    padding-top: 18px;
    gap: 12px;
  }

  .footer-legal {
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
  }
}

@media (max-width: 400px) {
  .footer-inner {
    padding: 0 12px 16px;
  }

  .footer-cta {
    padding: 14px 12px;
    margin-bottom: 20px;
  }

  .footer-cta-btn {
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .footer-legal {
    gap: 12px;
  }

  .footer-legal a {
    font-size: 0.85rem;
  }

  .footer-copyright {
    font-size: 0.8rem;
  }
}

.footer-brand-link {
  display: block;
  margin-bottom: 8px;
}

.footer-logo {
  height: 36px;
  width: auto;
  display: block;
  border-radius: 10px;
}

.footer-logo-light {
  display: none !important;
}

.footer-logo-dark {
  display: block !important;
}

body.theme-light .footer-logo-dark {
  display: none !important;
}

body.theme-light .footer-logo-light {
  display: block !important;
}

.footer-tagline {
  color: #94a3b8;
  line-height: 1.65;
  margin: 0 0 22px;
  max-width: 300px;
  font-size: 0.925rem;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact-link {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 0.2s, transform 0.2s;
}

.footer-contact-link:hover {
  color: #c4b5fd;
  transform: translateX(2px);
}

[dir="rtl"] .footer-contact-link:hover {
  transform: translateX(-2px);
}

.footer-contact-link i {
  color: #7c3aed;
  font-size: 1rem;
  opacity: 1;
}

.footer-heading {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #c4b5fd;
  margin: 0 0 20px;
  padding: 0 0 12px;
  border-bottom: 3px solid rgba(124, 58, 237, 0.5);
  text-shadow: 0 0 16px rgba(124, 58, 237, 0.25);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.2s;
}

.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
  transition: width 0.25s;
}

[dir="rtl"] .footer-links a::after {
  left: auto;
  right: 0;
}

.footer-links a:hover {
  color: #e9d5ff;
}

.footer-links a:hover::after {
  width: 100%;
}

.footer-col-payments .footer-payments-label {
  color: #94a3b8;
  margin: 0 0 14px;
  font-size: 0.875rem;
  font-weight: 600;
}

.footer-payments {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 22px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-payments img {
  height: 32px;
  width: auto;
  max-width: 44px;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity 0.2s, transform 0.2s;
}

.footer-payments img:hover {
  opacity: 1;
  transform: scale(1.05);
}

.footer-social {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-social-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.3) 0%, rgba(88, 28, 135, 0.2) 100%);
  color: #c4b5fd;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.15rem;
  border: 1px solid rgba(124, 58, 237, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.25s;
}

.footer-social-btn:hover {
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.5) 0%, rgba(139, 92, 246, 0.4) 100%);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4), 0 0 20px rgba(124, 58, 237, 0.2);
  border-color: rgba(167, 139, 250, 0.5);
}

.footer-trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px 28px;
  padding: 20px 0 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 600;
}

.footer-badge i {
  color: #a78bfa;
  font-size: 1rem;
}

.footer-badge-link {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-badge-link:hover {
  color: #c4b5fd;
}

body.theme-light .footer-trust-badges {
  border-top-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .footer-badge {
  color: #64748b;
}

body.theme-light .footer-badge i {
  color: #7c3aed;
}

body.theme-light .footer-badge-link {
  color: #475569;
}

body.theme-light .footer-badge-link:hover {
  color: #6d28d9;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0 0;
  border-top: 2px solid rgba(124, 58, 237, 0.25);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.04);
}

.footer-copyright {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s, text-decoration 0.2s;
}

.footer-legal a:hover {
  color: #c4b5fd;
  text-decoration: underline;
}

/* Cookie consent bar */
.cookie-consent-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 20px;
  background: linear-gradient(180deg, rgba(30, 27, 45, 0.98) 0%, rgba(22, 20, 34, 0.99) 100%);
  border-top: 2px solid rgba(124, 58, 237, 0.35);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.cookie-consent-bar.cookie-consent-hidden {
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
}

.cookie-consent-msg {
  margin: 0;
  color: #e2e8f0;
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1;
  min-width: 200px;
}

.cookie-consent-link {
  color: #a78bfa;
  text-decoration: underline;
}

.cookie-consent-link:hover {
  color: #c4b5fd;
}

.cookie-consent-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-consent-btn {
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
}

body.theme-light .cookie-consent-bar {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-top-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

body.theme-light .cookie-consent-msg {
  color: #334155;
}

body.theme-light .cookie-consent-link {
  color: #6d28d9;
}

body.theme-light .cookie-consent-link:hover {
  color: #5b21b6;
}

/* Pull-to-refresh indicator (صفحات القوائم) */
#key2lix-ptr {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 14px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #a78bfa;
  background: linear-gradient(180deg, rgba(18, 16, 28, 0.98) 0%, transparent 100%);
  z-index: 96;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.2s, opacity 0.2s;
  pointer-events: none;
}

#key2lix-ptr.key2lix-ptr-pulling,
#key2lix-ptr.key2lix-ptr-refreshing {
  transform: translateY(0);
  opacity: 1;
}

body.theme-light #key2lix-ptr {
  background: linear-gradient(180deg, #fff 0%, transparent 100%);
  color: #6d28d9;
}

/* PWA install banner */
.key2lix-pwa-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 98;
  padding: 16px calc(16px + env(safe-area-inset-left)) calc(16px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-right));
  background: linear-gradient(180deg, rgba(28, 26, 42, 0.98) 0%, rgba(18, 16, 28, 0.99) 100%);
  border-top: 2px solid rgba(124, 58, 237, 0.4);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s, visibility 0.3s;
}

.key2lix-pwa-banner.key2lix-pwa-banner-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.key2lix-pwa-banner-inner {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}

.key2lix-pwa-banner-text {
  margin: 0 0 14px;
  font-size: 0.95rem;
  color: #e2e8f0;
  line-height: 1.45;
}

.key2lix-pwa-banner-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.key2lix-pwa-banner-install {
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
  border: none;
  cursor: pointer;
}

.key2lix-pwa-banner-later {
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  background: transparent;
  color: #a78bfa;
  border: 2px solid rgba(124, 58, 237, 0.5);
  cursor: pointer;
}

.key2lix-pwa-banner-close {
  position: absolute;
  top: -8px;
  inset-inline-end: -8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.key2lix-pwa-banner-close:hover {
  background: rgba(124, 58, 237, 0.3);
  color: #e9d5ff;
}

body.theme-light .key2lix-pwa-banner {
  background: #fff;
  border-top-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

body.theme-light .key2lix-pwa-banner-text {
  color: #334155;
}

body.theme-light .key2lix-pwa-banner-later {
  color: #6d28d9;
  border-color: rgba(124, 58, 237, 0.4);
}

/* theme-light: Footer */
body.theme-light .footer {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
  border-top: 3px solid rgba(124, 58, 237, 0.4);
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.06);
}

body.theme-light .footer-top-bar {
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.35);
}

body.theme-light .footer-cta {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.15);
}

body.theme-light .footer-cta-text {
  color: #5b21b6;
  text-shadow: none;
}

body.theme-light .footer-tagline {
  color: #64748b;
}

body.theme-light .footer-contact-link {
  color: #475569;
}

body.theme-light .footer-contact-link:hover {
  color: #6d28d9;
}

body.theme-light .footer-heading {
  color: #5b21b6;
  border-bottom-color: rgba(124, 58, 237, 0.45);
  text-shadow: none;
}

body.theme-light .footer-links a {
  color: #475569;
}

body.theme-light .footer-links a:hover {
  color: #6d28d9;
}

body.theme-light .footer-links a::after {
  background: linear-gradient(90deg, #7c3aed, #8b5cf6);
}

body.theme-light .footer-col-payments .footer-payments-label {
  color: #64748b;
}

body.theme-light .footer-payments {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .footer-social-btn {
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.18) 0%, rgba(139, 92, 246, 0.12) 100%);
  color: #6d28d9;
  border-color: rgba(124, 58, 237, 0.3);
}

body.theme-light .footer-social-btn:hover {
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.3) 0%, rgba(139, 92, 246, 0.25) 100%);
  color: #5b21b6;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.25);
}

body.theme-light .footer-bottom {
  border-top-color: rgba(124, 58, 237, 0.3);
  box-shadow: none;
}

body.theme-light .footer-copyright {
  color: #64748b;
}

body.theme-light .footer-legal a {
  color: #475569;
}

body.theme-light .footer-legal a:hover {
  color: #7c3aed;
}

/* ===== صفحة ثانوية: هيرو موحّد — مبتكر ===== */
.page-hero {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 52px 24px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.22) 0%, rgba(30, 27, 48, 0.97) 50%, rgba(18, 16, 28, 0.98) 100%);
  border-radius: 0 0 var(--key2lix-radius-lg) var(--key2lix-radius-lg);
  margin-bottom: 36px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.15);
  box-shadow: var(--key2lix-shadow), 0 8px 32px rgba(124, 58, 237, 0.08);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(167, 139, 250, 0.12) 0%, transparent 55%);
  pointer-events: none;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f3e8ff;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

body.theme-light .page-hero h1 {
  color: #1e1b4b;
  text-shadow: none;
}

body.theme-light .page-hero {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12) 0%, rgba(255, 255, 255, 0.98) 50%, #f8fafc 100%);
  border-bottom-color: rgba(124, 58, 237, 0.2);
  box-shadow: var(--key2lix-shadow);
}

body.theme-light .page-hero::before {
  background: radial-gradient(ellipse 70% 40% at 50% -10%, rgba(124, 58, 237, 0.06) 0%, transparent 50%);
}

.lang-dropdown button {
  margin-left: 4px;
}

.theme-toggle {
  background: rgba(124, 58, 237, 0.8);
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}

.nav-cart-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cart-count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.15);
}


/* ===== Navbar — زجاجي واحترافي ===== */
.navbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(18, 16, 28, 0.75);
  border-bottom: 1px solid rgba(124, 58, 237, 0.12);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  transition: background var(--key2lix-transition), box-shadow var(--key2lix-transition);
}

.navbar:hover {
  background: rgba(22, 20, 34, 0.82);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-left img {
  height: 40px;
  width: auto;
}

.navbar-left span {
  font-size: 1.2em;
  font-weight: bold;
}

.navbar-center {
  flex: 1;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
}

.navbar-center input[type="text"],
.navbar-center .nav-search-input {
  width: 100%;
  max-width: 400px;
  padding: 8px 12px;
  border-radius: 5px;
  border: none;
}

#search-results {
  position: absolute;
  top: 38px;
  left: 0;
  right: 0;
  background: #1f1f28;
  max-height: 300px;
  overflow-y: auto;
  border-radius: 5px;
  display: none;
  z-index: 10;
}

#search-results div {
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

#search-results div:hover {
  background: #7c3aed;
}

.navbar-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.lang-dropdown {
  position: relative;
}

.lang-dropdown button {
  background: #7c3aed;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  color: white;
  cursor: pointer;
}

.lang-list {
  display: none;
  position: absolute;
  background-color: #1f1f28;
  min-width: 120px;
  border-radius: 5px;
  margin-top: 5px;
  padding: 0;
  list-style: none;
  z-index: 1000;
}

.lang-list li {
  padding: 8px 12px;
  cursor: pointer;
}

.lang-list li:hover {
  background-color: #7c3aed;
}

/* ===== Top bar — تصميم قوي ===== */
.nav-topbar {
  position: relative;
  z-index: 102;
  background: linear-gradient(180deg, rgba(18, 16, 28, 0.99) 0%, rgba(14, 12, 22, 0.98) 100%);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, transparent 0%, #7c3aed 20%, #a78bfa 50%, #7c3aed 80%, transparent 100%) 1;
  font-size: 0.8125rem;
  backdrop-filter: blur(14px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.nav-topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  transition: padding 0.2s ease;
}

/* Sticky هيدر مخفف عند التمرير (MOBILE-UX #5) */
#navbar.navbar-scrolled .nav-topbar-inner {
  padding: 6px 20px;
}

#navbar.navbar-scrolled .navbar {
  padding: 8px 20px;
  min-height: 52px;
}

#navbar.navbar-scrolled .nav-brand img {
  height: 34px;
}

@media (max-width: 768px) {
  #navbar.navbar-scrolled .navbar {
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  .nav-topbar-inner {
    padding: 8px 12px;
    gap: 6px;
  }

  .nav-topbar-tagline {
    font-size: 0.75rem;
  }

  .nav-topbar-link {
    padding: 4px 8px;
    font-size: 0.8rem;
  }

  .nav-topbar-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}

/* موبايل: تبسيط الشريط العلوي — إخفاء أزرار الدخول/الحساب (موجودة في الشريط السفلي) */
@media (max-width: 768px) {

  .nav-topbar .auth-btn,
  .nav-topbar .nav-topbar-sep {
    display: none !important;
  }

  .nav-topbar-inner {
    padding: 10px 16px;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .nav-topbar-tagline {
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
  }

  .nav-topbar-actions {
    gap: 6px;
    flex-shrink: 0;
  }

  .nav-topbar-link {
    padding: 8px 10px;
  }

  .nav-topbar-btn {
    padding: 8px 10px;
  }

  .theme-toggle.nav-topbar-btn {
    width: 38px;
    height: 38px;
  }

  .lang-dropdown-top button {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}

.nav-topbar-tagline {
  color: #c4b5fd;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

.nav-topbar-tagline::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.7), 0 0 24px rgba(34, 197, 94, 0.3);
  animation: navPulse 2s ease-in-out infinite;
}

@keyframes navPulse {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.7);
  }

  50% {
    opacity: 0.85;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.9);
  }
}

.nav-topbar-right,
.nav-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-topbar-actions .nav-topbar-btn {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
  text-decoration: none;
}

.nav-topbar-actions .nav-topbar-btn:hover {
  color: #7c3aed;
}

.nav-topbar-link {
  color: #a78bfa;
  text-decoration: none;
  transition: all 0.2s;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 500;
}

.nav-topbar-link:hover {
  color: #fff;
  background: rgba(124, 58, 237, 0.25);
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.3);
}

.nav-cart-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-topbar-sep {
  color: rgba(124, 58, 237, 0.4);
  font-size: 0.6rem;
  margin: 0 2px;
}

body.theme-light .nav-topbar-sep {
  color: rgba(124, 58, 237, 0.35);
}

.nav-topbar-btn {
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: #c4b5fd;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s;
}

.nav-topbar-btn:hover {
  color: #fff;
  background: rgba(124, 58, 237, 0.3);
  border-color: #7c3aed;
  box-shadow: 0 2px 16px rgba(124, 58, 237, 0.4);
}

.nav-notifications-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-bell {
  position: relative;
}

.nav-notifications-count {
  position: absolute;
  top: -10px;
  inset-inline-end: -10px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(239, 68, 68, 0.7), 0 0 0 2px rgba(255, 255, 255, 0.25);
  z-index: 2;
  pointer-events: none;
  line-height: 1;
}

.nav-notifications-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  min-width: 300px;
  max-width: 360px;
  max-height: 380px;
  overflow-y: auto;
  background: rgba(22, 20, 32, 0.99);
  border: 2px solid rgba(124, 58, 237, 0.4);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05), 0 0 40px rgba(124, 58, 237, 0.15);
  z-index: 1000;
  padding: 8px 0;
  backdrop-filter: blur(20px);
}

.nav-notifications-dropdown.show {
  display: block;
  animation: navDropdownIn 0.2s ease;
}

@keyframes navDropdownIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-notification-item {
  display: block;
  padding: 12px 16px;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
}

.nav-notification-item:last-child {
  border-bottom: none;
}

.nav-notification-item:hover {
  background: rgba(124, 58, 237, 0.12);
}

.nav-notification-item.unread {
  font-weight: 600;
  background: rgba(124, 58, 237, 0.06);
}

.nav-notifications-empty {
  padding: 20px 16px;
  color: #94a3b8;
  font-size: 0.9rem;
  margin: 0;
  text-align: center;
}

.nav-notifications-mark-all {
  display: block;
  width: 100%;
  padding: 10px 16px;
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #a78bfa;
  background: rgba(124, 58, 237, 0.12);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
}

.nav-notifications-mark-all:hover {
  background: rgba(124, 58, 237, 0.25);
  color: #e9d5ff;
}

body.theme-light .nav-notifications-dropdown {
  background: #fff;
  border-color: rgba(124, 58, 237, 0.15);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

body.theme-light .nav-notification-item {
  color: #334155;
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.theme-light .nav-notification-item:hover {
  background: rgba(124, 58, 237, 0.08);
}

body.theme-light .nav-notification-item.unread {
  background: rgba(124, 58, 237, 0.06);
}

.lang-dropdown-top .lang-list {
  top: 100%;
  margin-top: 6px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1001;
}

.lang-dropdown-top button {
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #c4b5fd;
  cursor: pointer;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
  transition: all 0.2s;
}

.lang-dropdown-top button:hover {
  color: #fff;
  border-color: #7c3aed;
  background: rgba(124, 58, 237, 0.3);
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.35);
}

body.theme-light .nav-topbar {
  background: linear-gradient(180deg, #fff 0%, #f5f3ff 100%);
  border-bottom: 3px solid rgba(124, 58, 237, 0.35);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

body.theme-light .nav-topbar-tagline {
  color: #5b21b6;
  font-weight: 600;
}

body.theme-light .nav-topbar-tagline::before {
  background: #16a34a;
  box-shadow: 0 0 10px rgba(22, 163, 74, 0.4);
  animation: none;
}

body.theme-light .nav-topbar-link {
  color: #6d28d9;
}

body.theme-light .nav-topbar-link:hover {
  color: #5b21b6;
  background: rgba(124, 58, 237, 0.15);
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.2);
}

body.theme-light .nav-topbar-btn {
  color: #5b21b6;
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.25);
}

body.theme-light .nav-topbar-btn:hover {
  color: #fff;
  background: #7c3aed;
  border-color: #7c3aed;
}

body.theme-light .lang-dropdown-top button {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.25);
  color: #5b21b6;
}

body.theme-light .lang-dropdown-top button:hover {
  color: #fff;
  background: #7c3aed;
  border-color: #7c3aed;
}

/* ===== أزرار التسجيل والدخول — قوية ===== */
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
  font-family: inherit;
  white-space: nowrap;
}

.auth-btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.auth-btn-primary:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.auth-btn-outline {
  background: transparent;
  color: #c4b5fd;
  border: 2px solid rgba(124, 58, 237, 0.6);
}

.auth-btn-outline:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: #7c3aed;
  color: #fff;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
}

.auth-btn-account {
  color: #e9d5ff;
  background: rgba(124, 58, 237, 0.15);
  border: 2px solid rgba(124, 58, 237, 0.35);
}

.auth-btn-account:hover {
  color: #fff;
  background: rgba(124, 58, 237, 0.35);
  border-color: #7c3aed;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

.auth-btn-vendor {
  color: #e9d5ff;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35) 0%, rgba(124, 58, 237, 0.2) 100%);
  border: 2px solid rgba(167, 139, 250, 0.6);
  text-decoration: none;
}

.auth-btn-vendor:hover {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  border-color: #a78bfa;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
  transform: translateY(-1px);
}

body.theme-light .auth-btn-vendor {
  color: #5b21b6;
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.35);
}

body.theme-light .auth-btn-vendor:hover {
  color: #fff;
  background: rgba(124, 58, 237, 0.25);
}

body.theme-light .auth-btn-outline {
  color: #6d28d9;
  border-color: rgba(124, 58, 237, 0.4);
}

body.theme-light .auth-btn-outline:hover {
  color: #5b21b6;
  background: rgba(124, 58, 237, 0.1);
}

body.theme-light .auth-btn-account {
  color: #475569;
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

body.theme-light .auth-btn-account:hover {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
}

/* أزرار في صفحات الدخول/التسجيل */
.auth-section {
  max-width: 420px;
  margin: 0 auto;
  padding: 40px 20px;
}

.auth-card {
  background: rgba(31, 31, 40, 0.95);
  border-radius: 20px;
  padding: 32px;
  border: 2px solid rgba(124, 58, 237, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.auth-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #f3e8ff;
}

.auth-subtitle {
  margin: 0 0 24px;
  color: #94a3b8;
  font-size: 0.95rem;
}

.auth-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #c4b5fd;
  font-size: 0.9rem;
}

/* لا نطبّق حدوداً على input مباشرة — فقط .auth-input-group يرسم الإطار */
.auth-form .auth-input-group~.auth-input-group {
  margin-top: 0;
}

.auth-error {
  color: #f87171;
  font-size: 0.9rem;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: rgba(239, 68, 68, 0.15);
  border-radius: 10px;
}

body.theme-light .auth-card {
  background: #fff;
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body.theme-light .auth-title {
  color: #1a1a1a;
}

body.theme-light .auth-subtitle {
  color: #64748b;
}

body.theme-light .auth-form .auth-input-group input {
  background: transparent;
  border: none;
  color: #1e293b;
}

.auth-page .auth-submit {
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
}

.auth-page .auth-submit {
  background: #7c3aed;
  color: #fff;
}

.auth-page .auth-submit:hover {
  background: #6d28d9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.auth-page .auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.auth-page .auth-links {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

body.theme-light .auth-page .auth-links {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.auth-page .auth-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  color: #7c3aed;
  text-decoration: none;
  transition: all 0.2s;
  margin: 0 4px;
}

.auth-page .auth-link:hover {
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
}

.auth-page .auth-link-secondary {
  color: #94a3b8;
  font-weight: 500;
}

.auth-page .auth-link-secondary:hover {
  color: #7c3aed;
}

body.theme-light .auth-page .auth-link-secondary {
  color: #64748b;
}

/* ===== Auth Pro — صفحات تسجيل دخول وتسجيل احترافية ومبتكرة ===== */
.auth-page #main-content {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  position: relative;
}

.auth-page #main-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 60% at 50% -10%, rgba(124, 58, 237, 0.12) 0%, transparent 45%), radial-gradient(ellipse 70% 50% at 0% 60%, rgba(139, 92, 246, 0.06) 0%, transparent 50%), radial-gradient(ellipse 70% 50% at 100% 60%, rgba(124, 58, 237, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.auth-page #main-content>* {
  position: relative;
  z-index: 1;
}

body.theme-light .auth-page #main-content::before {
  background: radial-gradient(ellipse 90% 60% at 50% -10%, rgba(124, 58, 237, 0.06) 0%, transparent 45%), radial-gradient(ellipse 60% 40% at 100% 80%, rgba(124, 58, 237, 0.04) 0%, transparent 50%);
}

.auth-wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.auth-hero {
  display: none;
}

.auth-section {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.auth-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(168deg, rgba(30, 29, 46, 0.98) 0%, rgba(24, 22, 38, 0.99) 100%);
  border-radius: 28px;
  padding: 0 0 40px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 1px 0 0 rgba(255, 255, 255, 0.03) inset;
  backdrop-filter: blur(24px);
  animation: auth-card-in 0.5s ease-out;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  z-index: 0;
  pointer-events: none;
}

.auth-card-accent {
  height: 5px;
  background: linear-gradient(90deg, transparent 0%, rgba(167, 139, 250, 0.8) 15%, #7c3aed 50%, rgba(167, 139, 250, 0.8) 85%, transparent 100%);
  margin-bottom: 0;
  border: none;
}

.auth-card-body {
  padding: 36px 32px 0;
  position: relative;
  z-index: 1;
}

body.theme-light .auth-card {
  background: linear-gradient(168deg, #ffffff 0%, #faf8ff 50%, #f5f3ff 100%);
  border-color: rgba(124, 58, 237, 0.18);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04), 0 25px 50px -12px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.03) inset;
}

body.theme-light .auth-card::before {
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.08), transparent);
}

body.theme-light .auth-card-accent {
  background: linear-gradient(90deg, transparent 0%, rgba(124, 58, 237, 0.4) 20%, #7c3aed 50%, rgba(124, 58, 237, 0.4) 80%, transparent 100%);
}

@keyframes auth-card-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card .auth-badge {
  animation: auth-fade-up 0.5s ease-out 0.05s both;
}

.auth-card .auth-title {
  animation: auth-fade-up 0.5s ease-out 0.1s both;
}

.auth-card .auth-subtitle {
  animation: auth-fade-up 0.5s ease-out 0.15s both;
}

.auth-form .auth-field {
  animation: auth-fade-up 0.45s ease-out both;
}

.auth-form .auth-field:nth-child(1) {
  animation-delay: 0.2s;
}

.auth-form .auth-field:nth-child(2) {
  animation-delay: 0.26s;
}

.auth-form .auth-field:nth-child(3) {
  animation-delay: 0.32s;
}

.auth-form .auth-field:nth-child(4) {
  animation-delay: 0.38s;
}

.auth-form .auth-field:nth-child(5) {
  animation-delay: 0.44s;
}

.auth-form .auth-field:nth-child(6) {
  animation-delay: 0.5s;
}

.auth-form .auth-field:nth-child(7) {
  animation-delay: 0.56s;
}

.auth-form .auth-field:nth-child(8) {
  animation-delay: 0.62s;
}

.auth-form .auth-row {
  animation: auth-fade-up 0.45s ease-out 0.36s both;
}

.auth-form .auth-submit {
  animation: auth-fade-up 0.45s ease-out 0.42s both;
}

@keyframes auth-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-card {
    animation: none;
  }

  .auth-card .auth-badge,
  .auth-card .auth-title,
  .auth-card .auth-subtitle,
  .auth-form .auth-field,
  .auth-form .auth-row,
  .auth-form .auth-submit {
    animation: none;
  }

  .auth-page .auth-link:hover {
    transform: none;
  }

  .auth-page .auth-submit:hover:not(:disabled) {
    transform: none;
  }
}

@media (min-width: 900px) {
  .auth-page #main-content {
    padding: 40px 24px;
    align-items: stretch;
  }

  .auth-wrap {
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    max-width: 1000px;
    min-height: 580px;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 40px 80px -20px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);
    background: linear-gradient(138deg, rgba(30, 29, 46, 0.98) 0%, rgba(24, 22, 38, 0.99) 100%);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(124, 58, 237, 0.18);
  }

  body.theme-light .auth-wrap {
    background: linear-gradient(138deg, #fff 0%, #faf8ff 100%);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.04), 0 40px 80px -20px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);
  }

  .auth-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 52px 44px;
    flex: 1;
    min-width: 0;
    max-width: 420px;
    position: relative;
    overflow: hidden;
  }

  .auth-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.12) 0%, transparent 45%), linear-gradient(235deg, rgba(139, 92, 246, 0.08) 0%, transparent 45%);
    pointer-events: none;
  }

  .auth-hero::after {
    content: '';
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 68%);
    top: -60px;
    right: -60px;
    pointer-events: none;
  }

  [dir="rtl"] .auth-hero::after {
    right: auto;
    left: -60px;
  }

  .auth-hero-content {
    position: relative;
    z-index: 1;
  }

  .auth-hero-logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
    font-size: 1.85rem;
    font-weight: 800;
    color: #f8f7ff;
    letter-spacing: -0.04em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  }

  .auth-hero-logo i {
    color: #a78bfa;
    font-size: 2.1rem;
    filter: drop-shadow(0 0 24px rgba(124, 58, 237, 0.35));
  }

  body.theme-light .auth-hero-logo {
    color: #1a1a2e;
    text-shadow: none;
  }

  .auth-hero-tagline {
    font-size: 1.05rem;
    color: #b8b5fc;
    line-height: 1.65;
    margin-bottom: 40px;
    max-width: 280px;
    letter-spacing: 0.01em;
  }

  body.theme-light .auth-hero-tagline {
    color: #5b21b6;
  }

  .auth-hero-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .auth-hero-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    color: #c4b5fd;
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 4px 0;
  }

  .auth-hero-list li i {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }

  body.theme-light .auth-hero-list li {
    color: #5b21b6;
  }

  body.theme-light .auth-hero-list li i {
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  }

  .auth-section {
    max-width: none;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 28px;
  }

  .auth-card {
    max-width: 420px;
    width: 100%;
    margin: 0;
    border-radius: 24px;
    animation: auth-card-in 0.6s ease-out 0.15s both;
  }

  body.theme-light .auth-wrap .auth-card {
    background: linear-gradient(168deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 248, 255, 0.98) 100%);
    border-color: rgba(124, 58, 237, 0.15);
  }
}

.auth-trust-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 28px;
  margin-top: 20px;
  padding: 12px 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.auth-trust-strip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.auth-trust-strip i {
  color: #16a34a;
  font-size: 0.85rem;
  opacity: 0.95;
}

body.theme-light .auth-trust-strip {
  border-top-color: rgba(0, 0, 0, 0.06);
}

body.theme-light .auth-trust-strip span {
  color: #64748b;
}

body.theme-light .auth-trust-strip i {
  color: #15803d;
}

.auth-social-row {
  margin-top: 20px;
}

.auth-social-row .auth-divider {
  margin: 0 0 18px;
}

.auth-social-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.auth-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.2);
  color: #e2e8f0;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.22s ease;
  cursor: pointer;
  font-family: inherit;
  min-width: 136px;
}

.auth-social-btn:hover {
  border-color: rgba(124, 58, 237, 0.35);
  background: rgba(124, 58, 237, 0.12);
  color: #c4b5fd;
}

.auth-social-btn:disabled,
.auth-social-btn.auth-coming {
  cursor: not-allowed;
  opacity: 0.8;
}

.auth-social-btn.auth-coming::after {
  content: 'قريباً';
  font-size: 0.7rem;
  background: rgba(124, 58, 237, 0.5);
  color: #fff;
  padding: 3px 10px;
  border-radius: 8px;
  margin-right: 6px;
  font-weight: 700;
}

[lang="en"] .auth-social-btn.auth-coming::after {
  content: 'Coming soon';
}

[dir="rtl"] .auth-social-btn.auth-coming::after {
  margin-right: 0;
  margin-left: 6px;
}

body.theme-light .auth-social-btn {
  border-color: rgba(0, 0, 0, 0.12);
  background: #f8fafc;
  color: #475569;
}

body.theme-light .auth-social-btn:hover {
  border-color: #7c3aed;
  background: rgba(124, 58, 237, 0.08);
  color: #5b21b6;
}

.auth-submit-shine {
  position: relative;
  overflow: hidden;
}

.auth-submit-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.auth-page .auth-submit:hover:not(:disabled).auth-submit-shine::after {
  left: 100%;
}

.auth-card .auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.14);
  color: #c4b5fd;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid rgba(124, 58, 237, 0.25);
}

.auth-card .auth-badge i {
  font-size: 0.875rem;
  opacity: 0.92;
}

body.theme-light .auth-card .auth-badge {
  background: rgba(124, 58, 237, 0.08);
  color: #6d28d9;
  border-color: rgba(124, 58, 237, 0.2);
}

.auth-card .auth-title {
  font-size: 1.875rem;
  margin: 0 0 10px;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: #f8f7ff;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

body.theme-light .auth-card .auth-title {
  color: #1a1a2e;
  text-shadow: none;
}

.auth-card .auth-subtitle {
  margin: 0 0 30px;
  line-height: 1.6;
  color: #a5b4fc;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
}

body.theme-light .auth-card .auth-subtitle {
  color: #64748b;
}

.auth-form .auth-field {
  margin-bottom: 26px;
  display: block;
}

.auth-form .auth-field label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #c4b5fd;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

body.theme-light .auth-form .auth-field label {
  color: #5b21b6;
}

/* ===== حقول Auth: إطار واحد فقط (inset shadow)، لا border/outline على الحاوية أو الـ input ===== */
.auth-input-group {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 52px;
  overflow: hidden;
  border: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.auth-input-group:focus-within {
  background-color: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 2px #7c3aed;
}

.auth-input-group *,
.auth-input-group *:focus,
.auth-input-group *:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

body.theme-light .auth-input-group {
  background: #f1f5f9;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

body.theme-light .auth-input-group:focus-within {
  background: #fff;
  box-shadow: inset 0 0 0 2px #7c3aed;
}

.auth-input-group .auth-icon {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b5cf6;
  font-size: 1rem;
  pointer-events: none;
  flex-shrink: 0;
}

.auth-input-group input {
  flex: 1;
  min-width: 0;
  min-height: 50px;
  padding: 15px 18px 15px 52px;
  margin: 0;
  border: none !important;
  background: transparent !important;
  color: #fff;
  font-size: 1rem;
  line-height: 1.4;
  border-radius: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  outline: none !important;
  box-shadow: none !important;
}

.auth-input-group input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

body.theme-light .auth-input-group input {
  color: #1e293b;
}

body.theme-light .auth-input-group input::placeholder {
  color: #94a3b8;
}

[dir="rtl"] .auth-input-group .auth-icon {
  left: auto;
  right: 0;
}

[dir="rtl"] .auth-input-group input {
  padding-left: 18px;
  padding-right: 52px;
}

.auth-input-group.has-toggle .auth-toggle-pwd {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: none !important;
  background: transparent;
  color: #8b5cf6;
  cursor: pointer;
  border-radius: 0;
  flex-shrink: 0;
  outline: none !important;
  box-shadow: none !important;
}

.auth-input-group.has-toggle .auth-toggle-pwd:hover {
  color: #a78bfa;
  background: rgba(124, 58, 237, 0.08);
}

.auth-input-group.has-toggle input {
  padding-left: 52px;
  padding-right: 18px;
}

[dir="rtl"] .auth-input-group.has-toggle .auth-toggle-pwd {
  left: auto;
  right: 0;
}

[dir="rtl"] .auth-input-group.has-toggle input {
  padding-left: 18px;
  padding-right: 52px;
}

.auth-password-strength {
  margin-top: 10px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

body.theme-light .auth-password-strength {
  background: rgba(0, 0, 0, 0.08);
}

.auth-password-strength-bar {
  height: 100%;
  width: 0;
  border-radius: 3px;
  transition: width 0.35s ease, background 0.3s;
}

.auth-password-strength-bar.weak {
  width: 33%;
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.auth-password-strength-bar.fair {
  width: 66%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.auth-password-strength-bar.strong {
  width: 100%;
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

.auth-hint {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 6px;
  line-height: 1.4;
}

body.theme-light .auth-hint {
  color: #64748b;
}

.auth-error {
  color: #fef2f2;
  font-size: 0.875rem;
  margin: 0 0 20px;
  padding: 14px 18px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.5;
  font-weight: 500;
}

.auth-error::before {
  content: '\f06a';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 2px;
}

body.theme-light .auth-error {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.22);
  color: #b91c1c;
}

.auth-page .auth-submit {
  width: 100%;
  padding: 18px 24px;
  border-radius: 14px;
  font-size: 1.0625rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s ease;
  margin-top: 12px;
  background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%);
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 8px 24px -4px rgba(124, 58, 237, 0.4), 0 1px 0 rgba(255, 255, 255, 0.12) inset;
  letter-spacing: 0.03em;
}

.auth-page .auth-submit:hover:not(:disabled) {
  background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 14px 36px -4px rgba(124, 58, 237, 0.45), 0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

.auth-page .auth-submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(124, 58, 237, 0.35), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
}

.auth-page .auth-submit:disabled {
  opacity: 0.9;
  cursor: not-allowed;
  transform: none;
}

.auth-page .auth-submit .auth-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  color: #94a3b8;
  font-size: 0.8125rem;
  font-weight: 500;
}

.auth-secure i {
  color: #16a34a;
  font-size: 0.875rem;
}

body.theme-light .auth-secure {
  color: #64748b;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 20px;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #a5b4fc;
  user-select: none;
  font-weight: 500;
}

.auth-remember input {
  width: 18px;
  height: 18px;
  accent-color: #7c3aed;
  cursor: pointer;
  border-radius: 4px;
}

body.theme-light .auth-remember {
  color: #5b21b6;
}

.auth-forgot {
  font-size: 0.9rem;
  color: #a78bfa;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.auth-forgot:hover {
  color: #c4b5fd;
  text-decoration: underline;
}

body.theme-light .auth-forgot {
  color: #6d28d9;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 28px 0 24px;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

body.theme-light .auth-divider {
  color: #94a3b8;
}

body.theme-light .auth-divider::before,
body.theme-light .auth-divider::after {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.08), transparent);
}

.auth-links-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
  padding: 26px 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

body.theme-light .auth-links-wrap {
  border-top-color: rgba(0, 0, 0, 0.06);
}

.auth-page .auth-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  color: #a78bfa;
  text-decoration: none;
  transition: all 0.22s ease;
  font-size: 0.9375rem;
}

.auth-page .auth-link:hover {
  background: rgba(124, 58, 237, 0.18);
  color: #e9d5ff;
  transform: translateY(-1px);
}

.auth-page .auth-link-secondary {
  color: #94a3b8;
  font-weight: 500;
}

.auth-page .auth-link-secondary:hover {
  color: #a78bfa;
}

.auth-footer {
  text-align: center;
  margin-top: 22px;
  padding: 0 24px 10px;
}

.auth-footer p {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.55;
  font-weight: 500;
}

.auth-footer a {
  color: #7c3aed;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.auth-footer a:hover {
  color: #8b5cf6;
  text-decoration: underline;
}

body.theme-light .auth-footer p {
  color: #94a3b8;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: #64748b;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.auth-brand i {
  color: #7c3aed;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.auth-brand:hover {
  color: #94a3b8;
}

.auth-brand:hover i {
  color: #8b5cf6;
}

body.theme-light .auth-brand {
  color: #94a3b8;
}

.auth-page .auth-submit:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 3px;
}

@media (min-width: 600px) {
  .auth-section {
    max-width: 460px;
  }

  .auth-card-body {
    padding: 40px 40px 0;
  }

  .auth-card {
    padding-bottom: 44px;
  }

  .auth-links-wrap {
    padding: 28px 40px 0;
  }

  .auth-card {
    transition: box-shadow 0.3s;
  }

  .auth-card:hover {
    box-shadow: 0 36px 72px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06) inset, 0 0 96px rgba(124, 58, 237, 0.08);
  }

  body.theme-light .auth-card:hover {
    box-shadow: 0 36px 72px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04), 0 0 80px rgba(124, 58, 237, 0.06);
  }
}

/* ===== Main navbar — تصميم قوي — هيدر ثابت (قائمة رئيسية واضحة) ===== */
#navbar {
  position: relative;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  padding: 16px 28px 16px 24px;
  min-height: 110px;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, transparent 0%, rgba(124, 58, 237, 0.5) 15%, #7c3aed 50%, rgba(124, 58, 237, 0.5) 85%, transparent 100%) 1;
  background: linear-gradient(180deg, rgba(22, 20, 34, 0.99) 0%, rgba(18, 16, 28, 0.98) 100%);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 1.35rem;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), filter 0.25s, opacity 0.2s;
  flex-shrink: 0;
  letter-spacing: -0.03em;
  padding: 8px 14px;
  margin: -8px -14px;
  border-radius: 14px;
  position: relative;
}

.nav-brand:hover {
  color: #fff;
  transform: translateY(-2px);
  filter: drop-shadow(0 6px 20px rgba(124, 58, 237, 0.4));
  opacity: 1;
}

.nav-brand .nav-logo {
  height: 88px !important;
  width: auto !important;
  min-width: 72px;
  min-height: 72px;
  display: block;
  object-fit: contain;
  border: none;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 2px rgba(255, 255, 255, 0.25)) brightness(1.25) contrast(1.3) saturate(1.2);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transition: filter 0.25s, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.nav-brand:hover .nav-logo {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 3px rgba(255, 255, 255, 0.3)) brightness(1.3) contrast(1.35) saturate(1.25);
  transform: scale(1.04);
}

.nav-logo-light {
  display: block !important;
}

.nav-brand-text {
  display: none !important;
}

.navbar-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.navbar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.navbar-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: #c4b5fd;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 12px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  position: relative;
}

.nav-link:hover {
  color: #fff;
  background: rgba(124, 58, 237, 0.3);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
  transform: translateY(-1px);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 18px;
  right: 18px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #a78bfa, transparent);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-link:hover::after {
  opacity: 0.8;
}

[dir="rtl"] .nav-link::after {
  left: 18px;
  right: 18px;
}

.nav-search-wrap.nav-search-g2a {
  flex: 1;
  min-width: 200px;
  max-width: 520px;
  position: relative;
}

.nav-search-wrap .nav-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #a78bfa;
  font-size: 1rem;
  pointer-events: none;
}

[dir="rtl"] .nav-search-wrap .nav-search-icon {
  left: auto;
  right: 18px;
}

.nav-search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border-radius: var(--key2lix-radius-sm);
  border: 1px solid rgba(124, 58, 237, 0.28);
  background: rgba(18, 16, 28, 0.6);
  color: #f1f5f9;
  font-size: 0.9375rem;
  font-weight: 500;
  outline: none;
  transition: border-color var(--key2lix-transition), box-shadow var(--key2lix-transition), background 0.2s;
}

.nav-search-input::placeholder {
  color: #a78bfa;
  opacity: 0.75;
}

.nav-search-input:focus {
  border-color: var(--key2lix-primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.22), var(--key2lix-glow);
  background: rgba(26, 24, 38, 0.85);
}

[dir="rtl"] .nav-search-input {
  padding-left: 20px;
  padding-right: 48px;
}

#search-results.nav-search-results {
  top: 100%;
  margin-top: 10px;
  border-radius: 14px;
  border: 2px solid rgba(124, 58, 237, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

#search-results.nav-search-results div {
  padding: 14px 18px;
  border-radius: 10px;
  margin: 3px 10px;
  font-weight: 500;
}

.dropdown .dropbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.drop-arrow {
  font-size: 0.65rem;
  transition: transform 0.25s;
  opacity: 0.9;
}

.dropdown.open .drop-arrow {
  transform: rotate(180deg);
}

@media (min-width: 769px) {
  .dropdown:hover .drop-arrow {
    transform: rotate(180deg);
  }
}

.dropdown-content.dropdown-mega {
  min-width: 260px;
  padding: 10px 0;
  border-radius: 16px;
  border: 2px solid rgba(124, 58, 237, 0.4);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05), 0 0 48px rgba(124, 58, 237, 0.12);
  background: rgba(22, 20, 36, 0.99);
  backdrop-filter: blur(20px);
  margin-top: 2px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  color: #e2e8f0;
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 600;
  font-size: 0.9375rem;
  margin: 0 8px;
  border-radius: 12px;
}

.dropdown-item i {
  color: #a78bfa;
  width: 22px;
  text-align: center;
  font-size: 1.1rem;
  filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.3));
}

.dropdown-item:hover {
  background: rgba(124, 58, 237, 0.25);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: translateX(-2px);
}

[dir="rtl"] .dropdown-item:hover {
  transform: translateX(2px);
}

.theme-toggle.nav-topbar-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.25);
  border: 2px solid rgba(124, 58, 237, 0.4);
  color: #e9d5ff;
}

.theme-toggle.nav-topbar-btn:hover {
  background: rgba(124, 58, 237, 0.4);
  border-color: #7c3aed;
  color: #fff;
  box-shadow: 0 2px 16px rgba(124, 58, 237, 0.4);
}

.theme-icon {
  font-size: 1rem;
  display: inline-block;
}

.theme-icon-sun {
  display: none;
}

body.theme-light .theme-icon-moon {
  display: none;
}

body.theme-light .theme-icon-sun {
  display: block;
}

body.theme-light .navbar {
  background: linear-gradient(180deg, #fff 0%, #f5f3ff 100%);
  border-bottom: 3px solid rgba(124, 58, 237, 0.4);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(0, 0, 0, 0.04) inset;
}

body.theme-light .nav-brand {
  color: #1a1a1a;
}

body.theme-light .nav-brand .nav-logo {
  box-shadow: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12)) brightness(1.15) contrast(1.25) saturate(1.15);
}

body.theme-light .nav-brand:hover .nav-logo {
  filter: drop-shadow(0 4px 10px rgba(124, 58, 237, 0.2)) brightness(1.2) contrast(1.3) saturate(1.2);
}

body.theme-light .nav-link {
  color: #5b21b6;
}

body.theme-light .nav-link:hover {
  color: #fff;
  background: rgba(124, 58, 237, 0.25);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

body.theme-light .nav-search-input {
  background: rgba(124, 58, 237, 0.06);
  color: #1e293b;
  border-color: rgba(124, 58, 237, 0.2);
}

body.theme-light .nav-search-input::placeholder {
  color: #6d28d9;
  opacity: 0.8;
}

body.theme-light .nav-search-input:focus {
  background: #fff;
  border-color: #7c3aed;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2);
}

body.theme-light .dropdown-content.dropdown-mega {
  background: #fff;
  border: 2px solid rgba(124, 58, 237, 0.3);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

body.theme-light .dropdown-item {
  color: #334155;
}

body.theme-light .dropdown-item:hover {
  color: #5b21b6;
  background: rgba(124, 58, 237, 0.12);
}

body.theme-light .dropdown-item i {
  color: #7c3aed;
}

body.theme-light .theme-toggle.nav-topbar-btn {
  background: rgba(124, 58, 237, 0.2);
  border-color: rgba(124, 58, 237, 0.35);
  color: #5b21b6;
}

body.theme-light .theme-toggle.nav-topbar-btn:hover {
  background: #7c3aed;
  color: #fff;
  border-color: #7c3aed;
}

@media (min-width: 769px) {
  .navbar-center {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }

  .navbar-menu {
    margin-top: 0;
  }
}

.loading-msg {
  text-align: center;
  padding: 2rem;
  color: #94a3b8;
}

.error-msg {
  text-align: center;
  padding: 2rem;
  color: #e74c3c;
}

.loading-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 2rem;
  min-height: 200px;
  width: 100%;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

body.theme-light .loading-spinner {
  border-color: rgba(0, 0, 0, 0.1);
  border-top-color: #7c3aed;
}

.products-skeleton {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.card-skeleton {
  width: 100%;
  max-width: 280px;
  background: rgba(31, 31, 40, 0.9);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.card-skeleton .sk-img {
  aspect-ratio: 1;
  background: linear-gradient(90deg, #2a2a35 25%, #3a3a48 50%, #2a2a35 75%);
  background-size: 200% 100%;
  animation: skeleton 1.2s ease infinite;
}

.card-skeleton .sk-body {
  padding: 18px;
}

.card-skeleton .sk-line {
  height: 14px;
  background: linear-gradient(90deg, #2a2a35 25%, #3a3a48 50%, #2a2a35 75%);
  background-size: 200% 100%;
  animation: skeleton 1.2s ease infinite;
  border-radius: 6px;
  margin-bottom: 10px;
}

.card-skeleton .sk-line.short {
  width: 50%;
}

.card-skeleton .sk-line.btn {
  height: 44px;
  margin-top: 12px;
  border-radius: 10px;
}

@keyframes skeleton {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

body.theme-light .card-skeleton {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .card-skeleton .sk-img,
body.theme-light .card-skeleton .sk-line {
  background: linear-gradient(90deg, #e2e8f0 25%, #cbd5e1 50%, #e2e8f0 75%);
  background-size: 200% 100%;
}

/* ===== Hero Section ===== */
.hero {
  text-align: center;
  margin: 50px 20px;
}

.hero-logo {
  height: 80px;
  margin-bottom: 20px;
}

/* ===== Stats Bar (مستوحى من G2A - اللون البنفسجي يبقى) ===== */
.stats-bar {
  background: rgba(31, 31, 40, 0.9);
  padding: 20px;
  margin: 0 20px 30px;
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.stats-bar-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.stat-item {
  color: #ccc;
  font-size: 0.95rem;
}

.stat-item strong {
  color: #7c3aed;
  margin-right: 6px;
}

/* ===== Category Grid (منطقة الأقسام - بطاقات كبيرة) ===== */
.category-grid-section {
  padding: 20px;
  max-width: 1000px;
  margin: 0 auto 40px;
}

.section-title {
  text-align: center;
  color: #7c3aed;
  margin-bottom: 24px;
  font-size: 1.5rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(31, 31, 40, 0.9);
  padding: 32px 20px;
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s;
  border: 2px solid transparent;
  min-height: 140px;
}

.category-tile:hover {
  border-color: #7c3aed;
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.25);
}

.category-tile-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.category-tile-label {
  font-weight: bold;
  font-size: 1.1rem;
}

.products-section {
  padding: 0 20px 40px;
}

.products-section .section-title {
  margin-bottom: 20px;
}

.products-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
}

.products-search {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(31, 31, 40, 0.8);
  color: #fff;
  font-size: 1rem;
}

.products-search:focus {
  outline: none;
  border-color: #7c3aed;
}

.products-sort {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(31, 31, 40, 0.8);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}

body.theme-light .products-search,
body.theme-light .products-sort {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.15);
  color: #1a1a1a;
}

.section-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.section-title-row .section-title {
  margin-bottom: 0;
}

.btn-view-all {
  padding: 8px 16px;
  background: #7c3aed;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.2s;
  white-space: nowrap;
}

.btn-view-all:hover {
  background: #5e22c7;
  color: #fff;
}

.hero-products {
  padding: 30px 20px;
}

.products-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  max-width: 900px;
  margin: 0 auto;
}

.products-tab {
  padding: 12px 24px;
  border: 2px solid #333;
  background: transparent;
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.25s;
}

.products-tab:hover {
  border-color: #7c3aed;
  color: #7c3aed;
}

.products-tab.active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}

.products-empty {
  text-align: center;
  padding: 40px 20px;
  color: #aaa;
}

.category-page {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.category-page .section-title {
  margin-top: 10px;
}

/* ===== Products List ===== */
.products-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

.card {
  background: #1f1f28;
  padding: 15px;
  width: 220px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.25s;
  border-radius: var(--key2lix-radius, 16px);
  box-shadow: var(--key2lix-shadow, 0 4px 15px rgba(0, 0, 0, 0.2));
  border: 1px solid var(--key2lix-border-light, rgba(255, 255, 255, 0.08));
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--key2lix-shadow-hover, 0 8px 25px rgba(124, 58, 237, 0.25));
}

.card .btn:focus-visible {
  outline: 2px solid var(--color-primary, #7c3aed);
  outline-offset: 2px;
}

/* صورة بنسبة ثابتة 16/10 */
.card .img-container {
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: var(--key2lix-radius-sm, 10px);
  margin-bottom: 12px;
  background: #2a2a35;
}

.card .prod-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--key2lix-radius-sm, 10px);
}

.prod-img {
  border-radius: var(--key2lix-radius-sm, 10px);
  margin-bottom: 10px;
}

.card h3 {
  font-size: 1rem;
  margin: 0 0 8px;
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold, 700);
}

.card-from {
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 4px;
}

.card-price {
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold, 700);
  color: var(--color-primary, #7c3aed);
  margin-bottom: 10px;
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 0;
}

.card-price .old-price {
  font-size: 0.85rem;
  color: #888;
  text-decoration: line-through;
  margin-left: 6px;
}

[dir="rtl"] .card-price .old-price {
  margin-left: 0;
  margin-right: 6px;
}

[dir="rtl"] .card-price {
  display: block;
  unicode-bidi: plaintext;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  background: var(--color-primary, #7c3aed);
  color: white;
  border-radius: var(--key2lix-radius-sm, 8px);
  margin-top: 6px;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.2s;
  font-weight: var(--font-weight-bold, 700);
  text-decoration: none;
}

.btn:hover {
  background: var(--color-primary-dark, #5e22c7);
}

.img-container {
  position: relative;
}

.card-wishlist-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 11;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  color: #f87171;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.card-wishlist-btn:hover {
  background: rgba(0, 0, 0, 0.6);
  color: #fca5a5;
}

.card-wishlist-btn i {
  font-size: 1rem;
}

.card-wishlist-btn .fas.fa-heart {
  color: #f87171;
}

/* ===== Products Page: بطاقات احترافية ===== */
.products-page .products-section {
  padding: 0 24px 48px;
  max-width: 1280px;
  margin: 0 auto;
}

.products-page .products-list {
  gap: 24px;
  padding: 28px 0;
}

.products-page .card {
  width: 240px;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(28, 28, 38, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
  opacity: 0;
  transform: translateY(12px);
}

.products-page .card.show {
  opacity: 1;
  transform: translateY(0);
}

.products-page .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(124, 58, 237, 0.2), 0 0 30px rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.25);
}

.products-page .card .img-container {
  aspect-ratio: 1;
  margin-bottom: 0;
  background: #1e1e28;
  border-radius: 0;
}

.products-page .card .prod-img {
  border-radius: 0;
  transition: transform 0.4s ease;
}

.products-page .card:hover .prod-img {
  transform: scale(1.05);
}

.products-page .card>h3,
.products-page .card>.card-from,
.products-page .card>.card-price,
.products-page .card>.card-rating,
.products-page .card>.btn {
  padding: 0 18px;
}

.products-page .card>h3 {
  padding-top: 16px;
  padding-bottom: 6px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #f1f5f9;
  min-height: 2.6em;
  line-height: 1.35;
}

.products-page .card-from {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 6px;
}

.products-page .card-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: #c4b5fd;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.products-page .card-price .old-price {
  font-size: 0.8rem;
  color: #64748b;
  margin-left: 8px;
}

.products-page .card .btn {
  display: block;
  width: calc(100% - 36px);
  margin: 0 18px 18px;
  padding: 14px 20px;
  border-radius: 12px;
  text-align: center;
  font-weight: 700;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.products-page .card .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.5);
}

.products-page .card-wishlist-btn {
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border-radius: 12px;
}

.products-page .badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.products-page .badge.discount {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.4);
}

.products-page .badge.hot {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4);
}

.products-page .products-empty {
  padding: 56px 24px;
  font-size: 1.05rem;
  color: #94a3b8;
  font-weight: 500;
  text-align: center;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

body.theme-light .products-page .card {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

body.theme-light .products-page .card:hover {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(124, 58, 237, 0.2), 0 0 24px rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.2);
}

body.theme-light .products-page .card>h3 {
  color: #1e293b;
}

body.theme-light .products-page .card-from {
  color: #64748b;
}

body.theme-light .products-page .card-price {
  color: #5b21b6;
}

body.theme-light .products-page .card-price .old-price {
  color: #94a3b8;
}

body.theme-light .products-page .products-empty {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: #64748b;
}

/* بطاقات المنتج على الموبايل — عرض كامل وزر واضح (MOBILE-UX #4) */
@media (max-width: 480px) {
  .products-list {
    padding: 12px;
    gap: 16px;
  }

  .products-list .card {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    box-sizing: border-box;
  }

  .products-list .card .img-container {
    min-height: 200px;
    aspect-ratio: 1;
  }

  .products-list .card h3 {
    font-size: 1.05rem;
    min-height: auto;
  }

  .products-list .card .card-price {
    font-size: 1.3rem;
    margin-bottom: 12px;
  }

  .products-list .card .btn {
    min-height: 48px;
    padding: 14px 20px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
  }

  .products-page .products-list {
    padding: 20px 0;
    gap: 20px;
  }

  .products-page .card {
    width: 100%;
    max-width: 100%;
  }

  .products-page .card .btn {
    width: calc(100% - 36px);
    margin-left: 18px;
    margin-right: 18px;
  }
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  font-size: 0.75em;
  z-index: 10;
}

.badge.hot {
  background-color: #e74c3c;
}

.badge.sale {
  background-color: #f1c40f;
  color: #333;
}

.badge.discount {
  background: #7c3aed;
}

/* ===== Hero Games ===== */
.hero-games {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
}

.hero-game-img {
  width: 100px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s;
}

.hero-game-img:hover {
  transform: scale(1.1);
}

/* ===== Product Page ===== */
.product-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px;
}

/* Breadcrumbs (مسار التنقل): الرئيسية > الفئة > اسم المنتج */
.breadcrumb {
  font-size: 0.88rem;
  margin-bottom: 20px;
  color: #94a3b8;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb li+li::before {
  content: "›";
  margin: 0 8px;
  color: #64748b;
}

.breadcrumb a {
  color: #7c3aed;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb .bc-sep {
  margin: 0 8px;
  color: #64748b;
}

.breadcrumb [aria-current="page"] {
  color: #e2e8f0;
  font-weight: 500;
}

.product-not-found {
  text-align: center;
  padding: 48px 20px;
}

.product-not-found .btn {
  margin-top: 20px;
}

body.theme-light .breadcrumb {
  color: #64748b;
}

body.theme-light .breadcrumb [aria-current="page"] {
  color: #1a1a1a;
}

.product-container {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
  align-items: flex-start;
}

.product-images {
  flex: 1;
  min-width: 260px;
  max-width: 380px;
}

.main-img {
  width: 100%;
  border-radius: 14px;
  margin-bottom: 12px;
  background: #252532;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.thumb-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}

.thumb-img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.thumb-img:focus {
  outline: none;
  border-color: #7c3aed;
}

.product-info {
  flex: 1;
  min-width: 260px;
  max-width: 420px;
}

.product-info h2 {
  font-size: 1.5rem;
  margin: 0 0 12px;
  line-height: 1.3;
  font-weight: 700;
  color: #f1f5f9;
}

.product-info p#product-desc {
  color: #94a3b8;
  line-height: 1.55;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.product-offer-meta {
  margin: -8px 0 16px;
  font-size: 0.9rem;
  color: #a78bfa;
}

body.theme-light .product-offer-meta {
  color: #7c3aed;
}

body.theme-light .product-info h2 {
  color: #1a1a1a;
}

body.theme-light .product-info p#product-desc {
  color: #64748b;
}

.product-prices-box {
  margin: 24px 0;
  padding: 20px;
  background: rgba(31, 31, 40, 0.8);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.prices-label {
  margin-bottom: 12px;
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 500;
}

.price-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.price-option-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 18px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(37, 37, 50, 0.8);
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
  text-align: center;
  min-width: 0;
}

.price-opt-label {
  font-size: 0.9em;
  opacity: 0.95;
  word-break: break-word;
  overflow-wrap: break-word;
  display: block;
  width: 100%;
  min-width: 0;
}

.price-opt-value {
  font-weight: 700;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
  flex-shrink: 0;
}

[dir="rtl"] .price-option-btn {
  align-items: flex-start;
  text-align: right;
}

[dir="rtl"] .price-opt-label {
  text-align: right;
}

.price-option-btn:hover {
  border-color: rgba(124, 58, 237, 0.5);
  background: rgba(124, 58, 237, 0.1);
}

.price-option-btn.selected {
  border-color: #7c3aed;
  background: #7c3aed;
  color: #fff;
}

.btn-order-now {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  padding: 16px 32px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--key2lix-radius-sm);
  transition: transform var(--key2lix-transition), box-shadow var(--key2lix-transition), background 0.2s;
  background: linear-gradient(135deg, var(--key2lix-primary) 0%, var(--key2lix-primary-dark) 100%);
  color: #fff;
  text-align: center;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  text-decoration: none;
  border: none;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
  box-sizing: border-box;
}

.btn-order-now:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  transform: translateY(-2px);
  box-shadow: var(--key2lix-shadow-hover), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-order-now i {
  font-size: 0.9em;
  transition: transform 0.2s;
}

.btn-order-now:hover i {
  transform: translateX(4px);
}

[dir="rtl"] .btn-order-now:hover i {
  transform: translateX(-4px);
}

@media (max-width: 768px) {
  .btn-order-now {
    max-width: none;
    width: 100%;
    padding: 18px;
  }
}

/* صفحة المنتج موبايل: خيارات chips + شريط ثابت أسفل (MOBILE-UX #7) */
@media (max-width: 768px) {
  .price-option-btn {
    padding: 14px 20px;
    font-size: 1rem;
    border-radius: 14px;
    min-height: 48px;
    min-width: 120px;
  }

  .product-mobile-sticky {
    display: flex !important;
    flex-wrap: wrap;
    gap: 12px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 97;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
    padding-inline: calc(16px + env(safe-area-inset-left)) calc(16px + env(safe-area-inset-right));
    background: linear-gradient(180deg, rgba(18, 16, 28, 0.98) 0%, rgba(14, 12, 22, 0.99) 100%);
    backdrop-filter: blur(20px);
    border-top: 2px solid rgba(124, 58, 237, 0.35);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
  }

  .product-mobile-sticky .btn-order-now,
  .product-mobile-sticky .btn-add-cart-sticky {
    flex: 1;
    min-width: 140px;
    min-height: 52px;
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
  }

  .product-mobile-sticky .btn-add-cart-sticky {
    background: rgba(124, 58, 237, 0.2);
    color: #e9d5ff;
    border: 2px solid rgba(124, 58, 237, 0.5);
  }

  .product-mobile-sticky .btn-add-cart-sticky:hover {
    background: rgba(124, 58, 237, 0.35);
    color: #fff;
  }

  body.theme-light .product-mobile-sticky {
    background: rgba(255, 255, 255, 0.98);
    border-top-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  }

  body.theme-light .product-mobile-sticky .btn-add-cart-sticky {
    background: rgba(124, 58, 237, 0.1);
    color: #6d28d9;
    border-color: rgba(124, 58, 237, 0.4);
  }

  body.theme-light .product-mobile-sticky .btn-add-cart-sticky:hover {
    background: rgba(124, 58, 237, 0.2);
    color: #5b21b6;
  }
}

@media (min-width: 769px) {
  .product-mobile-sticky {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .product-page {
    padding-bottom: 160px;
  }
}

.btn-copy-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  margin-left: 10px;
  padding: 12px 20px;
  font-size: 0.95rem;
  background: transparent;
  border: 2px solid #7c3aed;
  color: #7c3aed;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-copy-link:hover {
  background: rgba(124, 58, 237, 0.15);
  color: #a78bfa;
}

[dir="rtl"] .btn-copy-link {
  margin-left: 0;
  margin-right: 10px;
}

body.theme-light .btn-copy-link {
  border-color: #7c3aed;
  color: #7c3aed;
}

body.theme-light .btn-copy-link:hover {
  background: rgba(124, 58, 237, 0.12);
}

body.theme-light .product-prices-box {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .price-option-btn {
  background: rgba(248, 250, 252, 0.9);
  color: #334155;
  border-color: rgba(0, 0, 0, 0.1);
}

body.theme-light .price-option-btn.selected {
  background: #7c3aed;
  color: #fff;
  border-color: #7c3aed;
}

.product-reviews {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-light .product-reviews {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.product-reviews .reviews-title {
  color: #e2e8f0;
  margin: 0 0 16px;
  font-size: 1.2rem;
}

body.theme-light .product-reviews .reviews-title {
  color: #1e293b;
}

.reviews-stats {
  margin-bottom: 20px;
  color: #94a3b8;
  font-size: 0.95rem;
}

.reviews-stats .reviews-avg {
  color: #fbbf24;
  font-weight: 700;
  margin-left: 6px;
}

.reviews-stats .reviews-stars {
  color: #fbbf24;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.review-item {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body.theme-light .review-item {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

.review-item-stars {
  color: #fbbf24;
  margin-left: 8px;
}

.review-item-meta {
  color: #94a3b8;
  font-size: 0.85rem;
}

.review-item-comment {
  margin: 8px 0 0;
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.5;
}

body.theme-light .review-item-comment {
  color: #334155;
}

.review-form-wrap {
  margin-top: 20px;
  padding: 20px;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 14px;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.review-form-wrap h4 {
  margin: 0 0 14px;
  color: #a78bfa;
  font-size: 1rem;
}

.review-form-wrap label {
  display: block;
  margin-bottom: 6px;
  color: #94a3b8;
  font-size: 0.9rem;
}

.review-form-wrap select,
.review-form-wrap textarea {
  width: 100%;
  max-width: 400px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.review-form-wrap textarea {
  min-height: 80px;
  resize: vertical;
}

.review-login-hint {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-top: 12px;
}

.review-rating-row {
  margin-bottom: 12px;
}

.review-rating-row label {
  display: inline-block;
  margin-left: 8px;
}

body.theme-light .prices-label {
  color: #64748b;
}

/* ===== Form Page — بطاقة احترافية ===== */
.form-page {
  display: flex;
  justify-content: center;
  margin: 40px 20px;
}

.form-container {
  background: var(--key2lix-surface);
  padding: 28px;
  border-radius: var(--key2lix-radius);
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--key2lix-border);
  box-shadow: var(--key2lix-shadow);
  backdrop-filter: blur(12px);
}

.form-container h2 {
  text-align: center;
  margin-bottom: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.form-container label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 600;
  color: #c4b5fd;
}

.form-container input,
.form-container select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--key2lix-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
  margin-bottom: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-container input:focus,
.form-container select:focus {
  border-color: var(--key2lix-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.form-container button {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--key2lix-primary) 0%, var(--key2lix-primary-dark) 100%);
  color: #fff;
  border: none;
  border-radius: var(--key2lix-radius-sm);
  cursor: pointer;
  margin-top: 16px;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
}

.form-container button:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

body.theme-light .form-container {
  background: var(--key2lix-surface-light);
  border-color: var(--key2lix-border-light);
}

body.theme-light .form-container label {
  color: #5b21b6;
}

body.theme-light .form-container input,
body.theme-light .form-container select {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.1);
  color: #1e293b;
}

/* Form 2-step */
.form-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.form-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #333;
  color: #999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: all 0.2s;
}

.form-step.active {
  background: #7c3aed;
  color: #fff;
}

.form-step-line {
  width: 40px;
  height: 2px;
  background: #333;
}

.form-step-panel {
  animation: fadeIn 0.3s ease;
}

.form-readonly-hint {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0 0 16px;
  padding: 10px 14px;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(124, 58, 237, 0.15);
}

body.theme-light .form-readonly-hint {
  color: #64748b;
  background: rgba(124, 58, 237, 0.06);
  border-color: rgba(124, 58, 237, 0.12);
}

.order-summary {
  background: rgba(0, 0, 0, 0.2);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.order-summary p {
  margin: 8px 0;
}

.order-summary-card {
  padding: 20px 24px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.order-summary-card .order-summary-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.order-summary-card .order-summary-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.order-summary-card .order-summary-row:first-child {
  padding-top: 0;
}

.order-summary-block-order .order-summary-row:last-child {
  padding-bottom: 12px;
}

.order-summary-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 8px 0 16px;
}

.order-summary-block-contact .order-summary-row:first-child {
  padding-top: 4px;
}

body.theme-light .order-summary-divider {
  background: rgba(0, 0, 0, 0.1);
}

.order-summary-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--key2lix-fg, #e2e8f0);
  flex-shrink: 0;
  min-width: 0;
}

.order-summary-value {
  font-size: 1rem;
  color: var(--key2lix-fg, #f1f5f9);
  font-weight: 500;
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 0;
}

.order-summary-price-row .order-summary-label {
  color: var(--key2lix-fg, #e2e8f0);
}

.order-summary-price-row .order-summary-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--key2lix-accent, #a78bfa);
  letter-spacing: 0.02em;
  direction: ltr;
  unicode-bidi: isolate;
}

[dir="rtl"] .order-summary-row {
  align-items: flex-start;
  text-align: right;
}

[dir="rtl"] .order-summary-value {
  direction: inherit;
}

[dir="rtl"] .order-summary-price-row .order-summary-value {
  direction: ltr;
  text-align: right;
}

body.theme-light .order-summary-card {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.5);
}

body.theme-light .order-summary-card .order-summary-row {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.theme-light .order-summary-label {
  color: #334155;
}

body.theme-light .order-summary-value {
  color: #1e293b;
}

body.theme-light .order-summary-price-row .order-summary-value {
  color: #6d28d9;
}

.btn-next {
  margin-top: 8px;
}

.form-confirm-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.form-confirm-actions .btn {
  min-width: 120px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ===== Cart page ===== */
.cart-page .cart-section {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px 48px;
  font-family: 'Outfit', sans-serif;
}

.cart-hero {
  text-align: center;
  padding: 36px 24px 28px;
}

.cart-hero-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25) 0%, rgba(139, 92, 246, 0.2) 100%);
  border: 2px solid rgba(124, 58, 237, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-hero-icon i {
  font-size: 1.75rem;
  color: #a78bfa;
}

.cart-hero-title {
  margin: 0 0 6px;
  font-size: 1.75rem;
  font-weight: 800;
  color: #f3e8ff;
  letter-spacing: -0.02em;
}

.cart-hero-desc {
  margin: 0;
  font-size: 0.95rem;
  color: #94a3b8;
  font-weight: 500;
}

body.theme-light .cart-hero-title {
  color: #1a1a1a;
}

body.theme-light .cart-hero-desc {
  color: #64748b;
}

body.theme-light .cart-hero-icon {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.3);
}

body.theme-light .cart-hero-icon i {
  color: #7c3aed;
}

.cart-empty {
  text-align: center;
  padding: 56px 28px;
  background: linear-gradient(180deg, rgba(28, 26, 42, 0.6) 0%, rgba(22, 20, 34, 0.4) 100%);
  border-radius: 20px;
  border: 2px solid rgba(124, 58, 237, 0.2);
  margin-bottom: 24px;
}

.cart-empty-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.12);
  border: 2px dashed rgba(124, 58, 237, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-empty-icon i {
  font-size: 2.25rem;
  color: #a78bfa;
  opacity: 0.9;
}

.cart-empty-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: #e9d5ff;
  margin: 0 0 8px;
}

.cart-empty-desc {
  color: #94a3b8;
  margin: 0 0 28px;
  font-size: 1rem;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.cart-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.cart-empty-btn-primary {
  min-height: 48px;
  padding: 14px 24px;
  font-size: 1rem;
}

.cart-empty-btn-secondary {
  background: transparent;
  color: #a78bfa;
  border: 2px solid rgba(124, 58, 237, 0.5);
  min-height: 48px;
  padding: 14px 24px;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  font-weight: 700;
  transition: all 0.2s;
}

.cart-empty-btn-secondary:hover {
  background: rgba(124, 58, 237, 0.15);
  color: #e9d5ff;
  border-color: #7c3aed;
}

body.theme-light .cart-empty {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(124, 58, 237, 0.25);
}

body.theme-light .cart-empty-text {
  color: #5b21b6;
}

body.theme-light .cart-empty-desc {
  color: #64748b;
}

body.theme-light .cart-empty-btn-secondary {
  color: #6d28d9;
  border-color: rgba(124, 58, 237, 0.4);
}

body.theme-light .cart-empty-btn-secondary:hover {
  background: rgba(124, 58, 237, 0.1);
  color: #5b21b6;
}

.cart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: rgba(31, 31, 40, 0.8);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cart-count-line {
  margin: 0;
  color: #c4b5fd;
  font-size: 1rem;
  font-weight: 600;
}

.cart-num {
  color: #e9d5ff;
  font-weight: 800;
  margin-left: 4px;
}

[dir="rtl"] .cart-num {
  margin-left: 0;
  margin-right: 4px;
}

.cart-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.cart-clear-btn:hover {
  background: rgba(239, 68, 68, 0.28);
  color: #fca5a5;
}

.cart-clear-btn i {
  font-size: 0.95rem;
}

body.theme-light .cart-toolbar {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .cart-count-line {
  color: #6d28d9;
}

body.theme-light .cart-num {
  color: #5b21b6;
}

.cart-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  background: rgba(31, 31, 40, 0.95);
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cart-item:hover {
  border-color: rgba(124, 58, 237, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.cart-item-img {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 14px;
  overflow: hidden;
  background: #2a2a35;
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #f3e8ff;
  text-decoration: none;
  display: block;
  margin-bottom: 6px;
  line-height: 1.35;
}

.cart-item-name:hover {
  color: #c4b5fd;
}

.cart-item-value {
  margin: 0 0 14px;
  color: #a78bfa;
  font-size: 1rem;
  font-weight: 600;
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 0;
  display: block;
}

[dir="rtl"] .cart-item-value {
  text-align: right;
  unicode-bidi: plaintext;
}

.cart-item-order {
  display: inline-flex;
  padding: 12px 20px;
  font-size: 0.95rem;
  min-height: 44px;
}

.cart-item-remove {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.cart-item-remove:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.cart-item-remove:focus-visible {
  outline: 2px solid #f87171;
  outline-offset: 2px;
}

.cart-footer-actions {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cart-continue-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: transparent;
  color: #a78bfa;
  border: 2px solid rgba(124, 58, 237, 0.5);
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
}

.cart-continue-btn:hover {
  background: rgba(124, 58, 237, 0.15);
  color: #e9d5ff;
  border-color: #7c3aed;
}

[dir="rtl"] .cart-continue-btn i {
  transform: scaleX(-1);
}

body.theme-light .cart-item {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .cart-item:hover {
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.1);
}

body.theme-light .cart-item-name {
  color: #1a1a1a;
}

body.theme-light .cart-item-name:hover {
  color: #7c3aed;
}

body.theme-light .cart-item-value {
  color: #6d28d9;
}

body.theme-light .cart-continue-btn {
  color: #6d28d9;
  border-color: rgba(124, 58, 237, 0.4);
}

body.theme-light .cart-continue-btn:hover {
  background: rgba(124, 58, 237, 0.1);
  color: #5b21b6;
}

/* N5: تذكير السلة المهجورة */
.cart-reminder-box {
  margin-top: 24px;
  padding: 20px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 14px;
}

.cart-reminder-title {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 1rem;
  color: #c4b5fd;
}

.cart-reminder-desc {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.45;
}

.cart-reminder-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.cart-reminder-input {
  flex: 1;
  min-width: 180px;
  padding: 12px 14px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 1rem;
}

.cart-reminder-input:focus {
  outline: none;
  border-color: #7c3aed;
}

.cart-reminder-btn {
  padding: 12px 20px;
}

.cart-reminder-done {
  margin: 0;
  font-size: 0.95rem;
  color: #86efac;
}

body.theme-light .cart-reminder-box {
  background: rgba(124, 58, 237, 0.06);
  border-color: rgba(124, 58, 237, 0.2);
}

body.theme-light .cart-reminder-title {
  color: #6d28d9;
}

body.theme-light .cart-reminder-desc {
  color: #64748b;
}

body.theme-light .cart-reminder-input {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.1);
  color: #1e293b;
}

body.theme-light .cart-reminder-done {
  color: #16a34a;
}

.cart-promo-box {
  margin-top: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(139, 92, 246, 0.06) 100%);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 14px;
}

.cart-promo-line {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: #c4b5fd;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-promo-line:last-child {
  margin-bottom: 0;
}

.cart-promo-line i {
  color: #a78bfa;
  font-size: 1rem;
}

.cart-shipping-progress {
  margin: 10px 0 0;
  font-size: 0.95rem;
  color: #a78bfa;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-suggestions-wrap {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(124, 58, 237, 0.2);
}

.cart-suggestions-title {
  margin: 0 0 16px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #e9d5ff;
}

.cart-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.cart-suggestion-card {
  display: flex;
  flex-direction: column;
  padding: 14px;
  background: rgba(31, 31, 40, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cart-suggestion-card:hover {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.15);
}

.cart-suggestion-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: #2a2a35;
}

.cart-suggestion-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #e2e8f0;
  margin-top: 10px;
  line-height: 1.3;
}

.cart-suggestion-price {
  font-size: 0.9rem;
  color: #a78bfa;
  margin-top: 4px;
  font-weight: 600;
}

body.theme-light .cart-suggestions-title {
  color: #5b21b6;
}

body.theme-light .cart-suggestion-card {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .cart-suggestion-card:hover {
  border-color: rgba(124, 58, 237, 0.35);
}

body.theme-light .cart-suggestion-name {
  color: #334155;
}

body.theme-light .cart-suggestion-price {
  color: #6d28d9;
}

body.theme-light .cart-promo-box {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-color: rgba(124, 58, 237, 0.2);
}

body.theme-light .cart-promo-line {
  color: #5b21b6;
}

body.theme-light .cart-promo-line i {
  color: #7c3aed;
}

/* Cart modal (confirm clear) */
.cart-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.cart-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.cart-modal-box {
  position: relative;
  max-width: 400px;
  width: 100%;
  padding: 28px;
  background: linear-gradient(180deg, rgba(28, 26, 42, 0.98) 0%, rgba(22, 20, 34, 0.98) 100%);
  border: 2px solid rgba(124, 58, 237, 0.35);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.cart-modal-title {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #e9d5ff;
}

.cart-modal-desc {
  margin: 0 0 24px;
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.5;
}

.cart-modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cart-modal-cancel {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.cart-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.cart-modal-confirm {
  padding: 12px 20px;
}

body.theme-light .cart-modal-box {
  background: #fff;
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

body.theme-light .cart-modal-title {
  color: #5b21b6;
}

body.theme-light .cart-modal-desc {
  color: #64748b;
}

body.theme-light .cart-modal-cancel {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
  color: #334155;
}

body.theme-light .cart-modal-cancel:hover {
  background: rgba(0, 0, 0, 0.1);
}

@media (max-width: 480px) {
  .cart-page .cart-section {
    padding: 0 16px 32px;
  }

  .cart-hero {
    padding: 28px 16px 22px;
  }

  .cart-hero-icon {
    width: 56px;
    height: 56px;
  }

  .cart-hero-title {
    font-size: 1.45rem;
  }

  .cart-empty {
    padding: 40px 20px;
  }

  .cart-empty-actions {
    flex-direction: column;
  }

  .cart-empty-btn-primary,
  .cart-empty-btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .cart-toolbar {
    padding: 12px 14px;
    margin-bottom: 16px;
  }

  .cart-item {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
  }

  .cart-item-img {
    width: 100%;
    height: 180px;
    margin: 0 auto;
    max-width: 200px;
  }

  .cart-item-order {
    width: 100%;
    justify-content: center;
  }

  .cart-item-remove {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 44px;
    height: 44px;
  }

  .cart-item {
    position: relative;
    padding-top: 52px;
  }

  [dir="rtl"] .cart-item-remove {
    left: auto;
    right: 12px;
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .product-container {
    flex-direction: column;
    align-items: center;
  }

  .navbar {
    flex-direction: column;
    gap: 10px;
  }

  .navbar-center {
    order: 3;
    width: 100%;
  }

}

/* ===== Navbar ===== */
.navbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #1a1a1f;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-left img {
  height: 40px;
}

.navbar-left span {
  font-size: 1.2em;
  font-weight: bold;
  color: white;
}

.navbar-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.navbar-center input[type="text"] {
  width: 100%;
  max-width: 400px;
  padding: 8px 12px;
  border-radius: 5px;
  border: none;
}

#search-results {
  position: absolute;
  top: 38px;
  left: 0;
  right: 0;
  background: #1f1f28;
  max-height: 300px;
  overflow-y: auto;
  border-radius: 5px;
  display: none;
  z-index: 10;
}

#search-results div {
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

#search-results div:hover {
  background: #7c3aed;
}

/* ===== Navbar Menu ===== */
.navbar-menu {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.navbar-menu a {
  color: white;
  text-decoration: none;
  font-size: 0.95em;
  padding: 5px 0;
  transition: color 0.3s, border-bottom 0.3s;
  border-bottom: 2px solid transparent;
}

.navbar-menu a:hover {
  color: #7c3aed;
  border-bottom: 2px solid #7c3aed;
}


/* ===== Navbar Right ===== */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== موبايل G2A — متغيرات وتنسيق احترافي متعمق ===== */
:root {
  --nav-drawer-width: min(320px, 88vw);
  --nav-drawer-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --nav-drawer-duration: 0.32s;
  --nav-mobile-bar-bg: linear-gradient(180deg, #0f0e14 0%, #0c0b10 100%);
  --nav-drawer-bg: linear-gradient(180deg, #0f0e14 0%, #0a0910 100%);
  --nav-drawer-border: rgba(124, 58, 237, 0.35);
  --nav-drawer-shadow: 12px 0 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --nav-drawer-duration: 0.08s;
  }
}

.nav-mobile-bar-wrap {
  display: none;
}

.nav-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--nav-drawer-duration) var(--nav-drawer-ease), visibility 0s linear var(--nav-drawer-duration);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.nav-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-drawer-width);
  max-width: 320px;
  height: 100vh;
  height: 100dvh;
  z-index: 201;
  background: var(--nav-drawer-bg);
  border: none;
  border-inline-end: 2px solid var(--nav-drawer-border);
  box-shadow: var(--nav-drawer-shadow);
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--nav-drawer-duration) var(--nav-drawer-ease);
  overflow: hidden;
  will-change: transform;
  -webkit-overflow-scrolling: touch;
}

[dir="rtl"] .nav-drawer {
  left: auto;
  right: 0;
  transform: translateX(100%);
  border-inline-end: none;
  border-inline-start: 2px solid var(--nav-drawer-border);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.nav-drawer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 14px;
  padding-inline-start: max(14px, env(safe-area-inset-left));
  padding-inline-end: max(14px, env(safe-area-inset-right));
  border-bottom: 1px solid rgba(124, 58, 237, 0.18);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.2);
  min-width: 0;
}

.nav-drawer-close {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: none;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.2);
  color: #c4b5fd;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.nav-drawer-close:hover {
  background: rgba(124, 58, 237, 0.35);
  color: #fff;
}

.nav-drawer-close:active {
  transform: scale(0.96);
}

.nav-drawer-close:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.nav-drawer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: 10px;
  padding: 4px 6px;
  margin: -4px 0;
  transition: opacity 0.2s;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.nav-drawer-brand:hover {
  opacity: 0.9;
}

.nav-drawer-brand:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
  border-radius: 10px;
}

.nav-drawer-brand .nav-brand-text {
  display: inline-block !important;
  color: #e2e8f0;
  font-weight: 800;
  letter-spacing: -0.03em;
}

body.theme-light .nav-drawer-brand .nav-brand-text {
  color: #1e293b;
}

.nav-drawer-brand .nav-logo {
  height: 66px !important;
  width: auto !important;
  min-width: 54px;
  min-height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 2px rgba(255, 255, 255, 0.2)) brightness(1.22) contrast(1.28) saturate(1.15);
  transition: filter 0.2s, transform 0.2s;
}

.nav-drawer-brand:hover .nav-logo {
  filter: drop-shadow(0 4px 10px rgba(124, 58, 237, 0.3)) brightness(1.28) contrast(1.32);
  transform: scale(1.03);
}

.nav-drawer-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
  flex-shrink: 0;
}

.nav-drawer-header .nav-drawer-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  font-size: 0.9rem;
}

.nav-drawer-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.15);
  color: #c4b5fd;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  position: relative;
}

.nav-drawer-icon:hover {
  background: rgba(124, 58, 237, 0.3);
  color: #fff;
}

.nav-drawer-icon:active {
  transform: scale(0.95);
}

.nav-drawer-icon:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.nav-drawer-icon .cart-count {
  position: absolute;
  top: -2px;
  inset-inline-end: -2px;
  min-width: 16px;
  height: 16px;
  font-size: 0.6rem;
  padding: 0 3px;
}

.nav-drawer-header .nav-drawer-icon .cart-count {
  min-width: 14px;
  height: 14px;
  font-size: 0.55rem;
}

.nav-drawer-menu {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0 16px;
  -webkit-overflow-scrolling: touch;
  padding-inline-start: max(0px, env(safe-area-inset-left));
  padding-inline-end: max(0px, env(safe-area-inset-right));
}

.nav-drawer-menu-title {
  margin: 0 20px 10px;
  padding: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(196, 181, 253, 0.6);
}

.nav-drawer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-drawer-list li {
  margin: 0;
  padding: 0;
}

.nav-drawer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  width: 100%;
  box-sizing: border-box;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  text-align: start;
  transition: background 0.2s, color 0.2s;
  border-inline-start: 3px solid transparent;
  min-height: 48px;
}

.nav-drawer-link:hover {
  background: rgba(124, 58, 237, 0.12);
  color: #fff;
  border-inline-start-color: rgba(124, 58, 237, 0.5);
}

.nav-drawer-link:focus-visible {
  background: rgba(124, 58, 237, 0.1);
  outline: none;
  border-inline-start-color: #a78bfa;
}

.nav-drawer-link i:first-of-type {
  width: 22px;
  text-align: center;
  opacity: 0.95;
  color: #a78bfa;
  flex-shrink: 0;
}

.nav-drawer-arrow {
  margin-inline-start: auto;
  font-size: 0.7rem;
  opacity: 0.85;
  transition: transform 0.25s var(--nav-drawer-ease);
  flex-shrink: 0;
}

.nav-drawer-dropdown.open .nav-drawer-arrow {
  transform: rotate(180deg);
}

.nav-drawer-sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s var(--nav-drawer-ease);
  margin: 0 12px;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.nav-drawer-dropdown.open .nav-drawer-sub {
  grid-template-rows: 1fr;
}

.nav-drawer-sub>div {
  min-height: 0;
  overflow: hidden;
}

.nav-drawer-sub-inner {
  padding: 0 0 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 0 0 12px 12px;
}

.nav-drawer-sub a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  color: #c4b5fd;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.nav-drawer-sub a:hover {
  background: rgba(124, 58, 237, 0.2);
  color: #fff;
}

.nav-drawer-sub a:focus-visible {
  background: rgba(124, 58, 237, 0.15);
  outline: none;
}

.nav-drawer-sub a i {
  width: 20px;
  text-align: center;
  opacity: 0.9;
  flex-shrink: 0;
}

.nav-drawer-footer {
  padding: 14px 20px 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  padding-inline-start: max(20px, env(safe-area-inset-left));
  padding-inline-end: max(20px, env(safe-area-inset-right));
  border-top: 1px solid rgba(124, 58, 237, 0.18);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-drawer-plus {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.28) 0%, rgba(139, 92, 246, 0.22) 100%);
  border-radius: 14px;
  color: #e9d5ff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid rgba(124, 58, 237, 0.4);
  transition: background 0.2s, color 0.2s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.15);
}

.nav-drawer-plus:hover {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.38) 0%, rgba(139, 92, 246, 0.32) 100%);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.25);
}

.nav-drawer-plus:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.nav-drawer-plus i {
  color: #c4b5fd;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.nav-drawer-plus-badge {
  margin-inline-start: auto;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.25);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.nav-drawer-settings {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(226, 232, 240, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 12px;
  transition: background 0.2s, color 0.2s;
}

.nav-drawer-settings:hover {
  background: rgba(124, 58, 237, 0.12);
  color: #fff;
}

.nav-drawer-settings:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.nav-drawer-settings i {
  color: #94a3b8;
  font-size: 1rem;
  width: 22px;
  text-align: center;
}

body.theme-light .nav-drawer {
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border-inline-end-color: rgba(124, 58, 237, 0.22);
  box-shadow: 12px 0 32px rgba(0, 0, 0, 0.08);
}

body.theme-light .nav-drawer-header {
  background: rgba(0, 0, 0, 0.03);
}

body.theme-light .nav-drawer-menu-title {
  color: rgba(100, 116, 139, 0.9);
}

body.theme-light .nav-drawer-link {
  color: #334155;
}

body.theme-light .nav-drawer-link:hover {
  background: rgba(124, 58, 237, 0.08);
  color: #5b21b6;
  border-inline-start-color: rgba(124, 58, 237, 0.4);
}

body.theme-light .nav-drawer-sub a {
  color: #6d28d9;
}

body.theme-light .nav-drawer-sub a:hover {
  background: rgba(124, 58, 237, 0.1);
  color: #5b21b6;
}

body.theme-light .nav-drawer-footer {
  background: rgba(0, 0, 0, 0.02);
}

body.theme-light .nav-drawer-plus {
  background: rgba(124, 58, 237, 0.12);
  color: #5b21b6;
  border-color: rgba(124, 58, 237, 0.28);
  box-shadow: none;
}

body.theme-light .nav-drawer-plus:hover {
  background: rgba(124, 58, 237, 0.18);
  color: #4c1d95;
}

body.theme-light .nav-drawer-plus-badge {
  background: rgba(251, 191, 36, 0.2);
  color: #b45309;
  border-color: rgba(251, 191, 36, 0.35);
}

body.theme-light .nav-drawer-settings {
  color: #475569;
}

body.theme-light .nav-drawer-settings:hover {
  background: rgba(124, 58, 237, 0.08);
  color: #5b21b6;
}

body.theme-light .nav-drawer-settings i {
  color: #64748b;
}

@media (max-width: 768px) {
  .nav-mobile-bar-wrap {
    display: block;
    padding-top: env(safe-area-inset-top);
  }

  #nav-topbar {
    display: none !important;
  }

  .site-header>.navbar {
    display: none !important;
  }

  .nav-mobile-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px 12px;
    padding-inline-start: max(16px, env(safe-area-inset-left));
    padding-inline-end: max(16px, env(safe-area-inset-right));
    background: var(--nav-mobile-bar-bg);
    border-bottom: 1px solid rgba(124, 58, 237, 0.2);
    min-height: 56px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
  }

  .nav-mobile-menu-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: none;
    border-radius: 12px;
    background: rgba(124, 58, 237, 0.2);
    color: #c4b5fd;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s, transform 0.15s;
  }

  .nav-mobile-menu-btn:hover {
    background: rgba(124, 58, 237, 0.35);
    color: #fff;
  }

  .nav-mobile-menu-btn:active {
    transform: scale(0.96);
  }

  .nav-mobile-menu-btn:focus-visible {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
  }

  #navbar.nav-drawer-open .nav-mobile-menu-btn {
    background: rgba(124, 58, 237, 0.4);
    color: #fff;
  }

  .nav-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    font-weight: 800;
    font-size: 1.15rem;
    flex: 1;
    min-width: 0;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 12px;
    transition: opacity 0.2s, transform 0.2s;
  }

  .nav-mobile-brand:hover {
    opacity: 1;
    transform: translateY(-1px);
  }

  .nav-mobile-brand:focus-visible {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
  }

  .nav-mobile-brand .nav-logo {
    height: 72px !important;
    width: auto !important;
    min-width: 60px;
    min-height: 42px;
    object-fit: contain;
    flex-shrink: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    filter: brightness(1.2) contrast(1.25) saturate(1.1);
    transition: filter 0.2s;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
  }

  .nav-mobile-brand:hover .nav-logo {
    filter: brightness(1.25) contrast(1.3) saturate(1.15);
  }

  .nav-mobile-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .nav-mobile-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.15);
    color: #c4b5fd;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    position: relative;
  }

  .nav-mobile-icon:hover {
    background: rgba(124, 58, 237, 0.3);
    color: #fff;
  }

  .nav-mobile-icon:active {
    transform: scale(0.95);
  }

  .nav-mobile-icon:focus-visible {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
  }

  .nav-mobile-cart-count {
    position: absolute;
    top: -2px;
    inset-inline-end: -2px;
    min-width: 18px;
    height: 18px;
    font-size: 0.65rem;
    padding: 0 4px;
  }

  .nav-mobile-search-bar {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 10px 16px 14px;
    padding-inline-start: max(16px, env(safe-area-inset-left));
    padding-inline-end: max(16px, env(safe-area-inset-right));
    background: inherit;
    position: relative;
  }

  .nav-mobile-search-input {
    flex: 1;
    height: 46px;
    min-height: 46px;
    padding: 0 54px 0 18px;
    border: 1px solid rgba(124, 58, 237, 0.28);
    border-radius: 23px;
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  }

  .nav-mobile-search-input::placeholder {
    color: #94a3b8;
  }

  .nav-mobile-search-input:focus {
    border-color: #7c3aed;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.22);
  }

  .nav-mobile-search-input:focus-visible {
    outline: none;
  }

  .nav-mobile-search-btn {
    position: absolute;
    inset-inline-end: 18px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 14px rgba(124, 58, 237, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
  }

  .nav-mobile-search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 18px rgba(124, 58, 237, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }

  .nav-mobile-search-btn:active {
    transform: scale(0.98);
  }

  .nav-mobile-search-btn:focus-visible {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
  }

  [dir="rtl"] .nav-mobile-search-input {
    padding-left: 54px;
    padding-right: 18px;
  }

  [dir="rtl"] .nav-mobile-search-btn {
    inset-inline-end: auto;
    inset-inline-start: 18px;
  }

  .nav-search-results-mobile {
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    max-height: 60vh;
    z-index: 100;
    margin-top: 8px;
    border-radius: 16px;
    overflow: auto;
    background: rgba(22, 20, 36, 0.98);
    border: 2px solid rgba(124, 58, 237, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }

  .nav-search-results-mobile div {
    padding: 14px 18px;
    border-radius: 12px;
    margin: 4px 12px;
    font-weight: 500;
    transition: background 0.15s;
  }

  .nav-search-results-mobile div:hover {
    background: rgba(124, 58, 237, 0.2);
  }

  .nav-drawer {
    display: flex;
  }

  .nav-drawer-backdrop {
    display: block;
  }

  #navbar.nav-drawer-open .nav-drawer-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-duration: var(--nav-drawer-duration);
    transition-delay: 0s;
  }

  #navbar.nav-drawer-open .nav-drawer {
    transform: translateX(0);
  }

  [dir="rtl"] #navbar.nav-drawer-open .nav-drawer {
    transform: translateX(0);
  }

  #navbar.nav-drawer-open~#key2lix-ai-chat {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: visibility 0.2s, opacity 0.2s;
  }

  body.theme-light .nav-mobile-bar {
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    border-bottom-color: rgba(124, 58, 237, 0.18);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  }

  body.theme-light .nav-mobile-icon {
    background: rgba(124, 58, 237, 0.1);
    color: #6d28d9;
  }

  body.theme-light .nav-mobile-icon:hover {
    background: rgba(124, 58, 237, 0.2);
    color: #5b21b6;
  }

  body.theme-light .nav-mobile-search-input {
    background: rgba(0, 0, 0, 0.05);
    color: #1e293b;
    border-color: rgba(124, 58, 237, 0.22);
  }

  body.theme-light .nav-mobile-search-input:focus {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
  }

  body.theme-light .nav-search-results-mobile {
    background: #fff;
    border-color: rgba(124, 58, 237, 0.25);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  }

  body.theme-light .nav-search-results-mobile div:hover {
    background: rgba(124, 58, 237, 0.08);
  }
}

/* ===== اختيار اللغة (موبايل) ===== */
.nav-mobile-lang-picker {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 202;
  pointer-events: none;
}

.nav-mobile-lang-picker.is-open {
  pointer-events: auto;
}

.nav-mobile-lang-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-mobile-lang-picker.is-open .nav-mobile-lang-picker-backdrop {
  opacity: 1;
}

.nav-mobile-lang-picker-box {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #12101a 0%, #0f0e14 100%);
  border-radius: 20px 20px 0 0;
  padding: 20px 20px max(20px, env(safe-area-inset-bottom));
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.nav-mobile-lang-picker.is-open .nav-mobile-lang-picker-box {
  transform: translateY(0);
}

.nav-mobile-lang-picker-title {
  margin: 0 0 16px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(196, 181, 253, 0.7);
}

.nav-mobile-lang-picker-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-mobile-lang-picker-list li {
  margin: 0 0 8px;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.12);
  color: #e2e8f0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.nav-mobile-lang-picker-list li:last-child {
  margin-bottom: 0;
}

.nav-mobile-lang-picker-list li:hover {
  background: rgba(124, 58, 237, 0.25);
  color: #fff;
}

.nav-mobile-lang-picker-list li:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

body.theme-light .nav-mobile-lang-picker-box {
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.08);
}

body.theme-light .nav-mobile-lang-picker-title {
  color: #64748b;
}

body.theme-light .nav-mobile-lang-picker-list li {
  background: rgba(124, 58, 237, 0.08);
  color: #334155;
  border-color: rgba(124, 58, 237, 0.15);
}

body.theme-light .nav-mobile-lang-picker-list li:hover {
  background: rgba(124, 58, 237, 0.15);
  color: #5b21b6;
}

@media (max-width: 768px) {
  .nav-mobile-lang-picker {
    display: block;
  }
}

@media (min-width: 769px) {
  .nav-mobile-lang-picker {
    display: none !important;
  }
}

/* ===== ديسكتوب: إبقاء القائمة الحالية ===== */
@media (min-width: 769px) {
  .nav-drawer-backdrop {
    display: none !important;
  }

  .nav-drawer {
    display: none !important;
  }
}

/* ===== Dropdown Navbar ===== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background: transparent;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  color: white;
  font-size: 0.95em;
  transition: color 0.3s;
}

.dropbtn:hover {
  color: #7c3aed;
}

.dropdown-content {
  display: none;
  position: absolute;
  background: rgba(31, 31, 40, 0.95);
  backdrop-filter: blur(5px);
  min-width: 200px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  padding: 5px 0;
  margin-top: 2px;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown:hover .dropdown-content,
.dropdown.open .dropdown-content {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 1001;
}

/* عند فتح القائمة نرفع الـ navbar فوق الشريط العلوي حتى تُستقبل النقرات على الروابط */
#navbar.dropdown-open .navbar,
#navbar:has(.dropdown.open) .navbar {
  position: relative;
  z-index: 103;
}

.dropdown-content a {
  color: white;
  padding: 10px 15px;
  text-decoration: none;
  display: block;
  transition: background 0.2s, transform 0.2s;
  pointer-events: auto;
  cursor: pointer;
}

.dropdown-content a:hover {
  background: #7c3aed33;
  /* لون شفاف عند المرور */
  transform: translateX(5px);
}

/* ===== FAQ Section ===== */
.faq-section {
  max-width: 900px;
  margin: 50px auto;
  padding: 0 20px;
  color: white;
}

.faq-section h2 {
  text-align: center;
  color: #ffffff;
  margin-bottom: 30px;
  font-size: 2em;
}

/* ===== FAQ Items ===== */
.faq-item {
  background: rgba(31, 31, 40, 0.8);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item label {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1em;
  color: white;
  transition: background 0.3s;
}

.faq-item label:hover {
  background: rgba(124, 58, 237, 0.4);
}

.faq-item label i {
  margin-right: 15px;
  color: #7c3aed;
  min-width: 25px;
  text-align: center;
  font-size: 1.2em;
}

/* Hide the checkboxes */
.faq-item input {
  display: none;
}

/* Content */
.faq-item p {
  max-height: 0;
  padding: 0 20px;
  margin: 0;
  color: #ccc;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

/* Show content when checkbox is checked */
.faq-item input:checked~p {
  max-height: 500px;
  /* enough to show content */
  padding: 10px 20px 20px;
}

/* Optional: add a + / - icon dynamically */
.faq-item label::after {
  content: "+";
  margin-left: auto;
  font-weight: bold;
  font-size: 1.2em;
  transition: transform 0.3s;
}

.faq-item input:checked+label::after {
  content: "−";
  transform: rotate(180deg);
}

/* Responsive */
@media(max-width:768px) {
  .faq-section {
    padding: 0 10px;
  }

  .faq-item label {
    font-size: 1em;
    padding: 12px 15px;
  }

  .faq-item p {
    font-size: 0.95em;
  }
}

/* ===== FAQ Animation ===== */
.faq-item p {
  max-height: 0;
  padding: 0 20px;
  margin: 0;
  color: #ccc;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: max-height 0.5s ease, opacity 0.5s ease, transform 0.5s ease, padding 0.5s ease;
}

.faq-item input:checked~p {
  max-height: 500px;
  /* enough to show content */
  padding: 10px 20px 20px;
  opacity: 1;
  transform: translateY(0);
}

.special-offers {
  padding: 40px 20px;
  background: #1f1f28;
  color: white;
}

.special-offers h2 {
  color: #7c3aed;
  margin-bottom: 10px;
}

.special-offers p {
  color: #ccc;
  margin-bottom: 30px;
}

.offers-container,
.giftcards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.offer-card,
.giftcard {
  background: #2c2c3a;
  padding: 15px;
  border-radius: 10px;
  width: 250px;
  flex-shrink: 0;
  transition: transform 0.3s, box-shadow 0.3s;
}

.offer-card:hover,
.giftcard:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.5);
}

.offer-card .offer-header,
.giftcard h4 {
  font-size: 0.9em;
  color: #f39c12;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.offer-card h3 {
  font-size: 1.1em;
  margin: 5px 0;
}

.offer-card p,
.giftcard p {
  font-size: 0.9em;
  color: #ccc;
  margin-bottom: 10px;
}

.offer-card .price {
  display: flex;
  gap: 5px;
  align-items: center;
  font-weight: bold;
}

.offer-card .price .current {
  color: #7c3aed;
}

.offer-card .price .original {
  text-decoration: line-through;
  color: #aaa;
}

.offer-card .price .discount {
  color: #e74c3c;
  font-weight: bold;
}

.giftcard img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
}

.special-offers .btn {
  background: #7c3aed;
  color: white;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}

.special-offers .btn:hover {
  background: #5e22c7;
}

@media(max-width:768px) {

  .offers-container,
  .giftcards-container {
    flex-direction: column;
    align-items: center;
  }
}

/* ===== Unified Pages ===== */
.page-wrapper {
  max-width: 1000px;
  margin: 60px auto;
  padding: 20px;
  animation: fadeIn 0.6s ease;
}

.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-header h1 {
  color: #7c3aed;
  font-size: 2.2em;
}

.page-header p {
  color: #bbb;
}

.page-box {
  background: rgba(31, 31, 40, 0.9);
  padding: 30px;
  border-radius: 14px;
  margin-bottom: 25px;
}

.page-box h3 {
  margin-bottom: 10px;
  color: #fff;
}

.page-box p,
.page-box li {
  color: #ccc;
  line-height: 1.7;
}

.page-box ul {
  padding-left: 20px;
}

.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-header h1 {
  color: #7c3aed;
  font-size: 2.5em;
}

.page-header p {
  color: #ccc;
}

.steps,
.support-grid,
.plus-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.step-card,
.support-card,
.plus-card,
.news-card {
  background: rgba(31, 31, 40, 0.9);
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  transition: 0.3s;
}

.step-card:hover,
.support-card:hover,
.plus-card:hover,
.news-card:hover {
  transform: translateY(-5px);
}

.step-card i,
.support-card i,
.plus-card i {
  font-size: 2em;
  color: #7c3aed;
  margin-bottom: 10px;
}

.news-date {
  display: block;
  margin-top: 10px;
  color: #aaa;
  font-size: 0.85em;
}

/* ===== Secondary pages (unified) ===== */
.page-secondary .page-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-secondary .page-box {
  background: rgba(31, 31, 40, 0.9);
  padding: 32px;
  border-radius: 14px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-light .page-secondary .page-box {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
}

.page-secondary .page-box .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #7c3aed;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  margin: 8px 8px 0 0;
  transition: background 0.2s;
}

.page-secondary .page-box .btn:hover {
  background: #6d28d9;
  color: #fff;
}

.page-secondary .page-box .btn.whatsapp {
  background: #25D366;
}

.page-secondary .page-box .btn.whatsapp:hover {
  background: #128C7E;
}

/* ===== RTL (العربية) ===== */
[dir="rtl"] body {
  text-align: right;
}

[dir="rtl"] .dropdown-content a:hover {
  transform: translateX(-5px);
}

[dir="rtl"] .navbar-menu a,
[dir="rtl"] .dropdown-content a,
[dir="rtl"] .footer-col a,
[dir="rtl"] .page-box ul {
  text-align: right;
}

[dir="rtl"] .hero {
  text-align: center;
}

[dir="rtl"] .faq-item label i {
  margin-right: 0;
  margin-left: 15px;
}

[dir="rtl"] .lang-list {
  left: auto;
  right: 0;
}

/* ===== Toast ===== */
.key2lix-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 16px 28px;
  border-radius: var(--key2lix-radius-sm);
  background: var(--key2lix-surface);
  color: #f1f5f9;
  border: 1px solid rgba(124, 58, 237, 0.2);
  box-shadow: var(--key2lix-shadow), 0 8px 32px rgba(0, 0, 0, 0.35);
  z-index: 9999;
  font-size: 0.95rem;
  font-weight: 500;
  animation: key2lix-toast-in 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 90%;
}

.key2lix-toast.success {
  background: linear-gradient(135deg, #0d7d4d 0%, #047857 100%);
  border-color: rgba(255, 255, 255, 0.15);
}

.key2lix-toast.error {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
  border-color: rgba(255, 255, 255, 0.12);
}

body.theme-light .key2lix-toast {
  background: #1e293b;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: var(--key2lix-shadow);
}

body.theme-light .key2lix-toast.success {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

body.theme-light .key2lix-toast.error {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

@keyframes key2lix-toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ===== Account: Orders filter & table (احترافي) ===== */
.account-orders-filter {
  display: inline-flex;
  gap: 0;
  margin-bottom: 24px;
  flex-wrap: wrap;
  padding: 4px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.account-orders-filter .btn-filter {
  padding: 12px 22px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.account-orders-filter .btn-filter:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}

.account-orders-filter .btn-filter.active {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.4);
}

body.theme-light .account-orders-filter {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .account-orders-filter .btn-filter {
  color: #64748b;
}

body.theme-light .account-orders-filter .btn-filter:hover {
  color: #334155;
  background: rgba(0, 0, 0, 0.06);
}

body.theme-light .account-orders-filter .btn-filter.active {
  color: #fff;
}

.account-orders-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.account-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
}

.account-orders-table th,
.account-orders-table td {
  padding: 16px 20px;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.account-orders-table thead th {
  background: rgba(30, 30, 42, 0.95);
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.account-orders-table tbody td {
  background: rgba(24, 24, 35, 0.6);
  color: #e2e8f0;
}

.account-orders-table tbody tr:last-child td {
  border-bottom: none;
}

.account-orders-table tbody tr:hover td {
  background: rgba(124, 58, 237, 0.06);
}

.order-status {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.order-status.order-status-pending,
.order-status.order-status-preparing {
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

.order-status.order-status-completed {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.account-order-value-cell {
  white-space: normal;
  padding: 12px 14px !important;
}

.account-value-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 12px;
}

.account-value-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.account-value-label {
  font-size: 0.8rem;
  color: var(--muted, #94a3b8);
  font-weight: 600;
  min-width: 3.5em;
  flex-shrink: 0;
}

.account-value-content {
  font-weight: 600;
  color: var(--text, #e2e8f0);
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
}

.account-value-content.amount {
  color: #34d399;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: right;
}

[dir="rtl"] .account-value-row {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

[dir="rtl"] .account-value-content.amount {
  text-align: left;
}

body.theme-light .account-order-value-cell .account-value-block {
  background: rgba(124, 58, 237, 0.06);
  border-color: rgba(124, 58, 237, 0.12);
}

body.theme-light .account-value-label {
  color: #64748b;
}

body.theme-light .account-value-content {
  color: #1e293b;
}

body.theme-light .account-value-content.amount {
  color: #059669;
}

.account-value-line {
  display: block;
  font-size: 0.9rem;
  line-height: 1.6;
}

.account-value-line:first-child {
  color: var(--muted, #94a3b8);
}

.account-order-value-cell .account-value-line:last-child {
  font-weight: 600;
  color: #34d399;
}

body.theme-light .account-order-value-cell .account-value-line:last-child {
  color: #059669;
}

.account-order-actions {
  white-space: nowrap;
}

.account-order-actions .btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding: 8px 14px;
  border-radius: 10px;
  color: #a78bfa;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
  transition: background 0.2s, border-color 0.2s;
}

.account-order-actions .btn-link:hover {
  background: rgba(124, 58, 237, 0.22);
  border-color: rgba(124, 58, 237, 0.4);
}

.account-order-actions .btn-link i {
  font-size: 0.8rem;
  opacity: 0.9;
}

[dir="rtl"] .account-order-actions .btn-link {
  margin-left: 0;
  margin-right: 10px;
}

.account-no-orders {
  color: #94a3b8;
  padding: 24px;
  text-align: center;
}

body.theme-light .account-orders-table-wrap {
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

body.theme-light .account-orders-table thead th {
  background: rgba(0, 0, 0, 0.05);
  color: #64748b;
}

body.theme-light .account-orders-table tbody td {
  background: #fff;
  color: #1e293b;
  border-color: rgba(0, 0, 0, 0.06);
}

body.theme-light .account-orders-table tbody tr:hover td {
  background: rgba(124, 58, 237, 0.05);
}

body.theme-light .order-status.order-status-pending,
body.theme-light .order-status.order-status-preparing {
  background: rgba(234, 179, 8, 0.15);
  color: #ca8a04;
  border-color: rgba(234, 179, 8, 0.3);
}

body.theme-light .order-status.order-status-completed {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.3);
}

body.theme-light .account-order-actions .btn-link {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.2);
  color: #5b21b6;
}

body.theme-light .account-order-actions .btn-link:hover {
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(124, 58, 237, 0.35);
}

/* بطاقات الطلبات (موبايل) */
.account-order-card .order-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.account-order-card .order-actions .btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: #a78bfa;
  text-decoration: none;
}

.account-order-card .order-actions .btn-link:hover {
  background: rgba(124, 58, 237, 0.22);
  border-color: rgba(124, 58, 237, 0.4);
}

body.theme-light .account-order-card .order-actions .btn-link {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.2);
  color: #5b21b6;
}

body.theme-light .account-order-card .order-actions .btn-link:hover {
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(124, 58, 237, 0.35);
}

/* ===== Admin: Health bar ===== */
.admin-health-bar {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-health-bar.health-ok {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.admin-health-bar.health-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.admin-health-bar .health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.admin-health-bar .health-dot.health-ok {
  background: #22c55e;
}

.admin-health-bar .health-dot.health-error {
  background: #ef4444;
}

.admin-health-bar .health-sep {
  opacity: 0.7;
}

/* ===== AI توصيات ذكية ===== */
.product-recommendations .rec-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 20px;
  color: #e2e8f0;
}

body.theme-light .product-recommendations .rec-title {
  color: #0f172a;
}

.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.rec-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.rec-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.25);
}

.rec-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.rec-card-body {
  padding: 12px;
}

.rec-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  display: block;
  color: #e2e8f0;
}

.rec-card-price {
  font-size: 0.85rem;
  color: #a78bfa;
  font-weight: 600;
}

body.theme-light .rec-card {
  background: #f8fafc;
  border-color: rgba(124, 58, 237, 0.2);
}

body.theme-light .rec-card-name {
  color: #1e293b;
}

body.theme-light .rec-card-price {
  color: #7c3aed;
}

/* Quick view modal (مشترك: الرئيسية، المنتجات، الفئة) */
.home-quick-view-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.home-quick-view-overlay.visible {
  display: flex;
}

.home-quick-view-modal {
  background: linear-gradient(180deg, #1c1a2a 0%, #121022 100%);
  border-radius: 20px;
  max-width: 420px;
  width: 100%;
  overflow: hidden;
  border: 2px solid rgba(124, 58, 237, 0.4);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.home-quick-view-modal .img-wrap {
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
}

.home-quick-view-modal .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-quick-view-modal .card-body {
  padding: 20px;
}

.home-quick-view-modal h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: #f3e8ff;
}

.home-quick-view-modal .card-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: #a78bfa;
  margin-bottom: 20px;
}

.qv-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.qv-actions .btn {
  flex: 1;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.qv-actions .btn-qv-cart {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.qv-actions .btn-qv-view {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

.home-quick-view-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  z-index: 5;
}

[dir="rtl"] .home-quick-view-close {
  left: auto;
  right: 12px;
}

.card-qv-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.card-qv-btn:hover {
  background: rgba(124, 58, 237, 0.9);
}

.card-qv-btn:focus-visible {
  outline: none;
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.4);
}

[dir="rtl"] .card-qv-btn {
  right: auto;
  left: 10px;
}