:root {
  --colorA1: #a089e5;
  --colorA2: #a892e7;
  --colorAInverse: #ffffff;
  --colorB1: #1f1f1f;
  --colorB2: #313131;
  --colorBInverse: #ffffff;
  --colorC1: #8e8e8e;
  --colorC2: #e8e8e8;
  --colorC3: #f4f4f4;
  --colorCInverse: #ffffff;
  --colorWarmLight: #efceca;
  --colorWarmDark1: #C0392B;
  --colorWarmDark2: #c5493c;
  --colorWarmDarkInverse: #ffffff;
  --colorSuccessLight: #c8e7d5;
  --colorSuccessDark1: #239e57;
  --colorSuccessDark2: #35a664;
  --colorSuccessDarkInverse: #ffffff;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: none;
}

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

body {
  direction: rtl;
  font-family: 'Almarai', sans-serif;
  font-size: 14px;
  line-height: 1.2;
  margin: 0;
  background: #e8e8e8;
  color: var(--colorB1);
}

img {
  max-width: 100%;
  vertical-align: middle;
}

a {
  color: var(--colorA1);
  text-decoration: none;
}

button {
  font-family: inherit;
}

h1, h2, h3, h4, p {
  margin: 0;
}

.system-direction { direction: rtl; }
.text-center { text-align: center; }
.text-color-warm { color: var(--colorWarmDark1); }

.flex-row { display: flex; flex-direction: row; flex-wrap: wrap; }
.flex-row-reverse { display: flex; flex-direction: row-reverse; flex-wrap: wrap; }
.flex-row-center { display: flex; justify-content: center; align-items: center; }

/* ============ Material icons ============ */
.material-icons {
  direction: ltr;
  display: inline-block;
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
.md-inline { vertical-align: middle; }
.md-flip { transform: scaleX(-1); }
.md-14 { font-size: 14px; }
.md-16 { font-size: 16px; }
.md-18 { font-size: 18px; }
.md-20 { font-size: 20px; }
.md-22 { font-size: 22px; }
.md-26 { font-size: 26px; }
.md-30 { font-size: 30px; }
.md-36 { font-size: 36px; }

/* ============ 120 unit responsive grid ============ */
.sc-show, .mc-show, .lc-show { display: none !important; }

@media (max-width: 599px) {
  .sc-1 { width: 0.83%; } .sc-2 { width: 1.67%; } .sc-4 { width: 3.33%; }
  .sc-9 { width: 7.5%; } .sc-12 { width: 10%; } .sc-18 { width: 15%; }
  .sc-20 { width: 16.67%; } .sc-25 { width: 20.83%; } .sc-30 { width: 25%; }
  .sc-65 { width: 54.17%; } .sc-99 { width: 82.5%; } .sc-100 { width: 83.33%; }
  .sc-102 { width: 85%; } .sc-108 { width: 90%; } .sc-111 { width: 92.5%; }
  .sc-116 { width: 96.67%; } .sc-120 { width: 100%; }
  .sc-show { display: block !important; }
  .sc-hide { display: none !important; }
}

@media (min-width: 600px) and (max-width: 1024px) {
  .mc-1 { width: 0.83%; } .mc-2 { width: 1.67%; } .mc-4 { width: 3.33%; }
  .mc-9 { width: 7.5%; } .mc-12 { width: 10%; } .mc-18 { width: 15%; }
  .mc-20 { width: 16.67%; } .mc-25 { width: 20.83%; } .mc-30 { width: 25%; }
  .mc-65 { width: 54.17%; } .mc-99 { width: 82.5%; } .mc-100 { width: 83.33%; }
  .mc-102 { width: 85%; } .mc-108 { width: 90%; } .mc-111 { width: 92.5%; }
  .mc-116 { width: 96.67%; } .mc-120 { width: 100%; }
  .mc-show { display: block !important; }
  .mc-hide { display: none !important; }
}

@media (min-width: 1025px) {
  .lc-1 { width: 0.83%; } .lc-2 { width: 1.67%; } .lc-4 { width: 3.33%; }
  .lc-9 { width: 7.5%; } .lc-12 { width: 10%; } .lc-18 { width: 15%; }
  .lc-20 { width: 16.67%; } .lc-25 { width: 20.83%; } .lc-30 { width: 25%; }
  .lc-65 { width: 54.17%; } .lc-99 { width: 82.5%; } .lc-100 { width: 83.33%; }
  .lc-102 { width: 85%; } .lc-108 { width: 90%; } .lc-111 { width: 92.5%; }
  .lc-116 { width: 96.67%; } .lc-120 { width: 100%; }
  .lc-show { display: block !important; }
  .lc-hide { display: none !important; }
}

/* ============ Buttons ============ */
.button {
  display: inline-block;
  border: none;
  cursor: pointer;
  line-height: 1;
}
.button-small {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 14px;
}
.button-style-a {
  background: var(--colorA1);
  color: var(--colorAInverse);
}
.button-style-b {
  background: var(--colorB1);
  color: var(--colorBInverse);
  border-radius: 6px;
}

/* ============ الهيدر الحديث والتنسيقات الفاخرة ============ */
.header-modern {
  position: relative;
  z-index: 500;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.08);
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 1. الشريط العلوي الرئيسي */
.header-main-bar {
  padding: 4px 0;
  border-bottom: 1px solid #f1f5f9;
  transition: border-color 0.3s ease;
}

.header-main-bar .header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* الشعار */
.header-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand-logo {
  height: 105px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
  margin: -10px 0;
}

.brand-link:hover .brand-logo {
  transform: scale(1.03);
}

/* زر الهامبرغر للجوال */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 12px;
  color: #1e293b;
  transition: background 0.2s;
}

.mobile-nav-toggle:hover {
  background: #f1f5f9;
}

.hamburger-icon {
  width: 24px;
  height: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-icon span {
  display: block;
  height: 2.5px;
  width: 100%;
  background: #6d28d9;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.hamburger-icon.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}
.hamburger-icon.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* مربع البحث */
.header-search-wrap {
  flex: 1;
  max-width: 580px;
}

.header-search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.header-search-input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 40px;
  border-radius: 999px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: all 0.2s ease;
}

.header-search-input:focus {
  border-color: #7c3aed;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.header-search-form .search-icon {
  position: absolute;
  right: 14px;
  font-size: 22px;
  color: #7c3aed;
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  left: 12px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
  border-radius: 50%;
  transition: color 0.2s;
}

.search-clear-btn:hover {
  color: #ef4444;
}

/* أزرار الإجراءات السريعة */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
  transform: translateY(-1px);
}

.btn-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.btn-icon-wrap .material-icons {
  font-size: 22px;
  color: #6d28d9;
}

.badge-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  height: 18px;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

.badge-count.cart-badge {
  background: #10b981;
}

.theme-switch-btn {
  padding: 8px;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  justify-content: center;
}

.theme-switch-btn .material-icons {
  font-size: 22px;
  color: #f59e0b;
}

/* قائمة البروفايل المنزلقة */
.profile-dropdown-wrap {
  position: relative;
}

.dropdown-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: transparent;
}

.profile-avatar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #ddd6fe;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
  transition: all 0.2s ease;
}

.profile-avatar-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35);
}

.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 1000;
  width: 250px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}

.dropdown-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #7c3aed;
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.dropdown-user-details {
  min-width: 0;
}

.dropdown-user-details .user-name {
  display: block;
  font-size: 14px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-details .user-email {
  display: block;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-body {
  padding: 8px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  color: #334155;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  border: none;
  background: transparent;
  width: 100%;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dropdown-item .material-icons {
  font-size: 20px;
  color: #7c3aed;
}

.dropdown-item:hover {
  background: #f5f3ff;
  color: #6d28d9;
}

.dropdown-item.logout-btn {
  color: #ef4444;
  margin-top: 4px;
}

.dropdown-item.logout-btn .material-icons {
  color: #ef4444;
}

.dropdown-item.logout-btn:hover {
  background: #fef2f2;
}

/* 2. شريط التنقل والأقسام */
.header-nav-bar {
  background: #ffffff;
  padding: 4px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-categories-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  padding: 4px 0;
  flex: 1;
}

.nav-categories-scroll::-webkit-scrollbar {
  display: none;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.nav-item.home-item {
  background: #6d28d9;
  color: #ffffff;
}

.nav-item.home-item .material-icons {
  font-size: 18px;
  color: #ffffff;
}

.nav-item.home-item:hover {
  background: #5b21b6;
}

.header-social-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.social-link img {
  width: 28px;
  height: 28px;
  display: block;
  transition: transform 0.2s ease;
}

.social-link:hover img {
  transform: translateY(-2px);
}

/* 3. القائمة المنسدلة الجانبية للجوال (Drawer) */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  width: min(85vw, 320px);
  background: #ffffff;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mobile-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: #6d28d9;
}

.drawer-brand img {
  height: 75px;
  width: auto;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  transition: all 0.2s;
}

.drawer-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.drawer-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #f5f3ff;
  border-bottom: 1px solid #ddd6fe;
}

.drawer-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #7c3aed;
  color: #ffffff;
  font-weight: 800;
  font-size: 18px;
}

.drawer-user-info b {
  display: block;
  font-size: 14px;
  color: #0f172a;
}

.drawer-user-info span {
  display: block;
  font-size: 12px;
  color: #6d28d9;
}

.drawer-nav {
  list-style: none;
  margin: 0;
  padding: 12px;
  flex: 1;
}

.drawer-nav li a,
.drawer-logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  color: #334155;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s;
  width: 100%;
  border: none;
  background: transparent;
  text-align: right;
  cursor: pointer;
}

.drawer-nav li a:hover {
  background: #f5f3ff;
  color: #6d28d9;
}

.nav-cat-img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
}

.drawer-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 8px 0;
}

.drawer-logout-btn {
  color: #ef4444;
}

.drawer-logout-btn:hover {
  background: #fef2f2;
}

.drawer-footer {
  padding: 16px 20px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}

.drawer-socials {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* ============ التجاوب للهواتف والأجهزة اللوحية ============ */
@media (max-width: 1024px) {
  .header-modern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .header-brand {
    display: none;
  }

  .mobile-nav-toggle {
    order: 1;
  }

  .header-search-wrap {
    order: 4;
    flex: 1;
    min-width: 0;
    width: auto;
  }

  .header-main-bar .header-container {
    flex-wrap: wrap;
    row-gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .header-actions {
    order: 3;
  }

  .profile-dropdown-wrap {
    order: 5;
    align-self: center;
  }

  .action-btn .btn-label {
    display: none;
  }

  .action-btn {
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    justify-content: center;
  }

  .header-social-links {
    display: none;
  }

  .header-nav-bar {
    border-top: 1px solid #f1f5f9;
    padding: 4px 0;
  }
}

/* ============ الوضع الداكن للهيدر بالكامل ============ */
html.dark .header-modern {
  background: #12131e;
  border-bottom-color: #27273a;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

html.dark .header-main-bar,
html.dark .header-nav-bar {
  background: #12131e;
  border-bottom-color: #27273a;
}

html.dark .header-search-input {
  background: #1a1a2e;
  border-color: #27273a;
  color: #f8fafc;
}

html.dark .header-search-input:focus {
  border-color: #a78bfa;
  background: #1f1f38;
  box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.15);
}

html.dark .header-search-form .search-icon {
  color: #a78bfa;
}

html.dark .action-btn {
  background: #1a1a2e;
  border-color: #27273a;
  color: #cbd5e1;
}

html.dark .action-btn:hover {
  background: #27273a;
  color: #a78bfa;
  border-color: #3b3b54;
}

html.dark .btn-icon-wrap .material-icons {
  color: #a78bfa;
}

html.dark .badge-count {
  border-color: #12131e;
}

html.dark .profile-avatar-btn {
  border-color: #a78bfa;
  background: linear-gradient(135deg, #9333ea, #c084fc);
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.4);
}

html.dark .profile-dropdown-menu {
  background: #1a1a2e;
  border-color: #27273a;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

html.dark .dropdown-header {
  background: #161626;
  border-bottom-color: #27273a;
}

html.dark .dropdown-user-details .user-name {
  color: #f8fafc;
}

html.dark .dropdown-user-details .user-email {
  color: #94a3b8;
}

html.dark .dropdown-item {
  color: #cbd5e1;
}

html.dark .dropdown-item:hover {
  background: #27273a;
  color: #a78bfa;
}

html.dark .nav-item {
  background: #1a1a2e;
  color: #cbd5e1;
}

html.dark .nav-item:hover {
  background: #27273a;
  color: #a78bfa;
  border-color: #3b3b54;
}

html.dark .nav-item.home-item {
  background: #9333ea;
  color: #ffffff;
}

html.dark .mobile-nav-toggle {
  color: #f8fafc;
}

html.dark .mobile-nav-toggle:hover {
  background: #27273a;
}

html.dark .hamburger-icon span {
  background: #a78bfa;
}

html.dark .mobile-drawer {
  background: #12131e;
}

html.dark .drawer-header,
html.dark .drawer-footer {
  background: #161626;
  border-color: #27273a;
}

html.dark .drawer-brand {
  color: #a78bfa;
}

html.dark .drawer-user-card {
  background: #1a1a2e;
  border-color: #27273a;
}

html.dark .drawer-user-info b {
  color: #f8fafc;
}

html.dark .drawer-user-info span {
  color: #a78bfa;
}

html.dark .drawer-nav li a,
html.dark .drawer-logout-btn {
  color: #cbd5e1;
}

html.dark .drawer-nav li a:hover {
  background: #27273a;
  color: #a78bfa;
}

html.dark .drawer-divider {
  background: #27273a;
}

/* ============ Desktop sidebar menu ============ */
.site-menu {
  position: sticky;
  z-index: 100;
  align-self: flex-start;
  top: 10px;
}
.site-menu ul {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-menu li {
  width: 100%;
  margin-bottom: 5px;
  background-color: #fff;
  border-radius: 6px;
  transition: background .3s;
}
.site-menu li:hover { background: var(--colorC3); }
.site-menu a {
  display: block;
  min-height: 30px;
  padding: 6px 3px;
  border-radius: 6px;
  color: var(--colorB1);
  font-size: 14px;
}
.site-menu a img {
  width: 32px;
  height: 32px;
  margin-left: 5px;
  float: right;
  border-radius: 4px;
}
.site-menu .text-box {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding-left: 6px;
}
.site-menu li.title {
  background: var(--colorB1);
  color: #fff;
  text-align: center;
  padding: 10px;
  font-weight: bold;
}
.site-menu li.title a {
  color: #fff;
}

/* ============ Quick links ============ */
.site-quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.site-quick-list a {
  background: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  color: var(--colorB1);
  border: 1px solid var(--colorC2);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.site-quick-list .material-icons { font-size: 18px; color: var(--colorA1); }

/* ============ Layout containers ============ */
#center {
  max-width: 1200px;
  margin: 10px auto;
}
@media (max-width: 599px) {
  #center { margin: 12px 5px; }
}
@media (min-width: 600px) and (max-width: 1024px) {
  #center { margin: 10px 5px; }
}
.site { display: flex; flex-wrap: wrap; }
.site-content { padding: 0 6px; }

/* ============ Carousel — تصميم فاخر ومميز ============ */
.carousel-wrapper {
  position: relative;
  margin-bottom: 22px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(160, 137, 229, 0.08);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(160, 137, 229, 0.12);
  direction: ltr; /* إجبار الاتجاه اليساري لضمان دقة حركة الـ Slide والـ Translate */
}
.carousel-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 3 / 1; /* الحفاظ على نسبة العرض والارتفاع الذهبية 1200x400 بنسبة 3 إلى 1 */
}
@media (max-width: 640px) {
  .carousel-viewport {
    aspect-ratio: 2.5 / 1; /* جعلها أطول قليلاً على شاشات الجوال لتبدو نصوص الإعلانات واضحة وممتازة */
  }
}
.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1);
}
.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill; /* استخدام fill أو cover لضمان ملاءمة الصورة الكاملة للإطار بدون قص الإطراف أو النصوص */
  transform: scale(1);
  transition: transform 6s ease;
}
/* تأثير زووم بطيء وحركي للشريحة النشطة لإضفاء طابع سينمائي فاخر */
.carousel-slide.active img {
  transform: scale(1.05);
}

/* نصوص الشريحة - التصميم الأصلي الأول (شريط داكن سفلي بنص أبيض في المنتصف) */
.carousel-caption {
  position: absolute;
  bottom: 0;
  right: 30px;
  left: auto;
  max-width: calc(100% - 60px);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px 20px 0 0;
  text-align: right;
  font-size: 26px;
  direction: rtl;
}

@media (max-width: 640px) {
  .carousel-caption { right: 10px; max-width: calc(100% - 20px); padding: 8px 14px; font-size: 16px; border-radius: 12px 12px 0 0; }
}

/* رقم الشريحة */
.carousel-slide-number {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  color: #1e1935;
  padding: 4px 10px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  direction: ltr;
}
html.dark .carousel-slide-number {
  background: rgba(33, 27, 56, 0.8);
  color: #f1ecff;
  border-color: rgba(255, 255, 255, 0.08);
}

/* أزرار التنقل الزجاجية اللامعة */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #1e1935;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.carousel-wrapper:hover .carousel-nav {
  opacity: 1;
}
html.dark .carousel-nav {
  background: rgba(33, 27, 56, 0.75);
  color: #f1ecff;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.carousel-nav:hover {
  background: var(--colorA1, #7a5fd0);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 20px rgba(122, 95, 208, 0.3);
}
.carousel-nav.next { right: 16px; }
.carousel-nav.prev { left: 16px; }

@media (max-width: 640px) {
  .carousel-nav { width: 34px; height: 34px; opacity: 1; }
  .carousel-nav.next { right: 8px; }
  .carousel-nav.prev { left: 8px; }
}

/* نقاط المؤشرات - تمدد انسيابي فاخر (Active Pill Indicator) */
.carousel-dots {
  position: absolute;
  bottom: 16px;
  right: 0;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 5;
}
.carousel-dots button {
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.carousel-dots button.active {
  width: 24px;
  background: var(--colorA1, #7a5fd0);
  box-shadow: 0 2px 8px rgba(122, 95, 208, 0.4);
}
html.dark .carousel-dots button {
  background: rgba(255, 255, 255, 0.2);
}
html.dark .carousel-dots button.active {
  background: #a78bfa;
}

/* ============ Product sections ============ */
.product-index-block-title {
  border-right: 6px solid var(--colorA2);
  padding: 16px 16px 16px 4px;
  box-shadow: 0 0 2px var(--colorC1);
  margin-bottom: 10px;
  color: #fff;
  font-size: 16px;
  background: var(--colorB1);
  border-radius: 6px;
  position: sticky;
  top: 0;
  z-index: 60;
  overflow: hidden;
  display: flex;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}
@media (max-width: 1024px) {
  .product-index-block-title {
    top: 85px;
  }
}
.product-index-block-title:hover {
  background: var(--colorB2);
}
.product-index-block-title-show-all {
  display: inline-block;
  font-size: 11px;
  background: var(--colorA1);
  border: 1px solid #fff;
  color: #fff;
  padding: 6px;
  border-radius: 6px;
  white-space: nowrap;
}
.product-brief-content-grid {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1%;
  row-gap: 10px;
  margin-bottom: 10px;
}
@media (max-width: 599px) {
  .product-brief-content-grid { column-gap: 2%; }
}
/* — كل مجموعة (ProductSection) تكون سكرول أفقي — */
.product-index-block-title-wrapper .product-brief-content-grid,
.product-detail .product-brief-content-grid {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 14px;
  column-gap: 14px;
  padding: 6px 4px 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #c4b5fd #f1f5f9;
}
.product-index-block-title-wrapper .product-brief-content-grid::-webkit-scrollbar,
.product-detail .product-brief-content-grid::-webkit-scrollbar { height: 8px; }
.product-index-block-title-wrapper .product-brief-content-grid::-webkit-scrollbar-thumb,
.product-detail .product-brief-content-grid::-webkit-scrollbar-thumb { background:#c4b5fd; border-radius:999px; }
.product-index-block-title-wrapper .product-brief-content-grid .product-brief-content-wrapper,
.product-detail .product-brief-content-grid .product-brief-content-wrapper {
  flex: 0 0 auto;
  scroll-snap-align: start;
}
.product-index-block-show-all-bottom {
  flex-basis: 100%;
  background: #fff;
  padding: 8px;
  border-radius: 6px;
  box-shadow: 0 0 2px var(--colorC1);
  font-size: 13px;
  text-align: center;
  color: var(--colorB1);
  display: block;
  transition: background .3s;
}
.product-index-block-show-all-bottom:hover { background: var(--colorC3); }

/* ============ Product card ============ */
.product-brief-content-wrapper {
  width: 22%;
}
@media (min-width: 600px) and (max-width: 1024px) {
  .product-brief-content-wrapper { width: 32.66%; }
}
@media (max-width: 599px) {
  .product-brief-content-wrapper { width: 49%; }
}
.product-brief-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  box-shadow: 0 0 2px var(--colorC1);
  line-height: 1.4;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  transition: box-shadow .5s;
}
.product-brief-content:hover {
  box-shadow: 0 0 4px var(--colorSuccessDark1);
}
.product-brief-content.out-of-stock { opacity: 0.4; }
.cat-title {
  background: var(--colorC3);
  text-align: center;
  border-bottom: 3px solid var(--colorC2);
  width: 100%;
  padding: 6px;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.product-body {
  position: relative;
}
.wishlist-toggle {
  position: absolute;
  left: 0;
  padding: 6px;
  margin: 6px;
  z-index: 2;
  background: rgba(232,232,232,0.5);
  border-radius: 16px;
  border: none;
  cursor: pointer;
  color: var(--colorWarmDark1);
  transition: transform .2s;
}
.wishlist-toggle.active { color: var(--colorWarmDark1); }
.wishlist-toggle .material-icons { font-size: 20px; }
.float-element-on-image {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.offer-price-percentage {
  background: var(--colorSuccessDark1);
  opacity: 0.9;
  padding: 4px 6px;
  color: #fff;
  border-radius: 6px 0 0 6px;
  direction: rtl;
  margin: 6px 0 0 0;
  font-size: 12px;
}
.promotional-mark {
  background: var(--colorWarmDark1);
  opacity: 0.85;
  color: #fff;
  margin: 6px -2px 0 0;
  padding: 3px 6px 3px 16px;
  font-size: 11px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%);
  animation: promotional-mark-animation 2s ease-in-out infinite;
  transform-origin: right center;
}
@keyframes promotional-mark-animation {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-2deg); }
  75% { transform: rotate(2deg); }
}
.image-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  text-align: center;
}
.image-wrapper img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform .5s;
}
.product-brief-content:hover .image-wrapper img {
  transform: scale(1.03);
}
@media (min-width: 600px) and (max-width: 1024px) {
  .image-wrapper img { height: 240px; }
}
.image-caption,
.image-caption-out-of-stock {
  position: absolute;
  bottom: 6px;
  right: 0;
  background: rgba(0,0,0,0.5);
  color: #fff;
  padding: 6px;
  font-size: 11px;
  border-radius: 8px 0 0 8px;
  line-height: 1.2;
}
.image-caption-out-of-stock {
  bottom: 46px;
  background: var(--colorWarmDark1);
  opacity: 0.8;
}
.price {
  text-align: center;
  color: var(--colorSuccessDark1);
  padding-bottom: 3px;
  width: 100%;
  direction: rtl;
  font-weight: bold;
  font-size: 14px;
  padding-top: 6px;
}
.price del {
  color: #000;
  opacity: 0.5;
  font-weight: normal;
}
.price sup {
  padding: 0 3px;
  direction: ltr;
}
.offer-info {
  text-align: center;
  padding-bottom: 6px;
  width: 100%;
}
.offer-info .timer-chip {
  background: var(--colorSuccessLight);
  font-size: 10px;
  border-radius: 6px;
  padding: 2px 5px;
  margin: 0 1px;
  display: inline-block;
}
.title {
  padding: 3px 6px 6px;
  text-align: justify;
  width: 100%;
}
.title h2 {
  padding: 0;
  margin: 0;
  font-size: inherit;
  color: #000;
  text-align: center;
  font-weight: 700;
}
.buy-button {
  text-align: center;
  padding: 6px 0 2px;
  width: 100%;
  opacity: 0.9;
  display: flex;
  justify-content: center;
  flex-grow: 1;
  align-items: flex-end;
}
.buy-button .button {
  transform: scale(0.85);
  display: inline-flex;
  align-items: center;
}
.buy-button .button .material-icons { font-size: 18px; }
.product-in-cart {
  visibility: hidden;
  background: var(--colorSuccessLight);
  color: var(--colorSuccessDark1);
  font-size: 10px;
  padding: 5px 8px;
  border-radius: 6px;
  margin: 2px auto 6px;
  width: fit-content;
  position: relative;
}
.product-in-cart.show { visibility: visible; }
.product-in-cart::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 50%;
  transform: translateX(50%);
  border: 4px solid transparent;
  border-bottom-color: var(--colorSuccessLight);
}

/* ============ Footer ============ */
.socialicon {
  height: 32px;
  width: 32px;
  display: block;
}

/* ============ قائمة بروفايل المستخدم في الهيدر ============ */
.profile-menu-wrap {
  position: relative;
}
.profile-btn {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 50%;
  background: var(--colorA1, #7c3aed);
  color: #fff;
  font-family: inherit;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
}
.profile-btn:hover {
  filter: brightness(1.1);
}
.profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 1000;
  width: 240px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, .08);
  background: #fff;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .18);
  overflow: hidden;
}
.profile-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.profile-menu-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 50%;
  background: var(--colorA1, #7c3aed);
  color: #fff;
  font-weight: bold;
  font-size: 18px;
}
.profile-menu-info {
  min-width: 0;
}
.profile-menu-info b {
  display: block;
  color: #222;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-menu-info span {
  display: block;
  color: #888;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border: none;
  background: none;
  color: #c0392b;
  font-family: inherit;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  text-align: right;
}
.profile-menu-item .material-icons {
  font-size: 18px;
}
.profile-menu-item:hover {
  background: #fdf3f3;
}
.footer-wrapper {
  background: var(--colorB1);
  padding: 10px 0 0;
}
.site-footer {
  max-width: 1180px;
  margin: auto;
  color: #fff;
  padding: 10px 10px 20px;
  line-height: 1.6;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  text-align: center;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 14px; }
}
.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 18px;
  margin-bottom: 4px;
}
.footer-logo .material-icons {
  color: var(--colorA2);
  font-size: 24px;
}
.footer-brand p {
  margin: 0;
  font-size: 13px;
  opacity: .85;
}
.footer-social {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.footer-social a {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .3s, background .3s;
}
.footer-social a:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.22);
}
.footer-copy {
  font-size: 13px;
}
.footer-copy a { color: #fff; opacity: .85; }
.footer-credit {
  margin-top: 4px;
  font-size: 13px;
}
.footer-credit b {
  color: var(--colorA2);
  font-weight: 700;
}
.back-to-top {
  background: var(--colorA2);
  padding: 6px 12px;
  margin-top: 8px;
  border-radius: 20px;
  border: 1px solid #fff;
  cursor: pointer;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  transition: background .3s;
}
.back-to-top:hover { background: var(--colorA1); }

/* floating whatsapp */
.whatsapp-send-button-wrapper {
  position: fixed;
  bottom: 14px;
  right: 14px;
  z-index: 101;
}
.whatsapp-send-button {
  display: flex;
  width: 44px;
  height: 44px;
  background: #1BD741;
  border-radius: 24px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* ============ Blazor error ui ============ */
#blazor-error-ui {
  background: lightyellow;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}
#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}

/* ============ مؤشر التحميل ============ */
.loading-block { display: flex; align-items: center; justify-content: center; padding: 80px 0; }
.loading-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 3px solid #e9e6f5;
  border-top-color: var(--colorA1, #a089e5);
  animation: store-spin 0.9s linear infinite;
}
@keyframes store-spin { to { transform: rotate(360deg); } }

/* ============ الحالة الفارغة ============ */
.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--colorB1, #7a6a9e);
}
.empty-state .material-icons { font-size: 56px; color: var(--colorA1, #a089e5); display: block; margin-bottom: 12px; }
.empty-state p { margin: 0 0 16px; font-size: 16px; }
.empty-state a { color: var(--colorA1, #a089e5); font-weight: 700; }

/* ============ صفحة المنتجات ============ */
.products-page { padding: 12px 0 40px; }
.products-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.products-head h1 { font-size: 26px; font-weight: 800; color: var(--colorA1, #7a5fd0); margin: 0; }
.products-head p { color: var(--colorB1, #7a6a9e); margin: 0; }
.products-controls { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.products-search {
  flex: 1; min-width: 220px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid #e6e2f5; background: #fff; font-family: inherit; font-size: 15px;
}
.products-select {
  padding: 12px 14px; border-radius: 12px; border: 1px solid #e6e2f5;
  background: #fff; font-family: inherit; font-size: 14px; color: #4a3f66;
}
.category-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  display: inline-block; padding: 7px 14px; border-radius: 999px;
  background: #f4f1fb; color: #6a5a94; font-size: 13px; font-weight: 700;
  border: 1px solid transparent; text-decoration: none;
}
.chip:hover { background: #ece6fa; }
.chip.active { background: var(--colorA1, #a089e5); color: #fff; }

/* ============ صفحة آراء وتجارب زبائننا — تصميم مميز وفاخر ============ */
.testimonials-page {
  padding: 16px 0 50px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Hero Header */
.t-hero {
  text-align: center;
  background: linear-gradient(135deg, rgba(246, 213, 247, 0.4) 0%, rgba(251, 233, 215, 0.5) 50%, rgba(230, 220, 255, 0.35) 100%);
  border: 1px solid rgba(160, 137, 229, 0.2);
  border-radius: 24px;
  padding: 32px 20px 28px;
  margin-bottom: 28px;
  box-shadow: 0 4px 20px rgba(160, 137, 229, 0.08);
  position: relative;
  overflow: hidden;
}
html.dark .t-hero {
  background: linear-gradient(135deg, rgba(46, 36, 74, 0.85) 0%, rgba(32, 27, 52, 0.9) 100%);
  border-color: rgba(160, 137, 229, 0.25);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}
.t-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: var(--colorA1, #7a5fd0);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(122, 95, 208, 0.15);
  margin-bottom: 14px;
  border: 1px solid rgba(160, 137, 229, 0.25);
}
html.dark .t-hero-badge {
  background: #2a2245;
  color: #c4b5fd;
  border-color: rgba(196, 181, 253, 0.25);
}
.t-hero-title {
  font-size: 32px;
  font-weight: 800;
  color: #2d2448;
  margin: 0 0 10px;
  line-height: 1.3;
}
html.dark .t-hero-title {
  color: #f1ecff;
}
.t-hero-sub {
  color: #6d6288;
  font-size: 15px;
  max-width: 620px;
  margin: 0 auto 26px;
  line-height: 1.6;
}
html.dark .t-hero-sub {
  color: #b3a9c9;
}

/* Trust Stats Bar */
.t-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 920px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .t-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .t-hero-title { font-size: 24px; }
}
@media (max-width: 480px) {
  .t-stats-grid {
    grid-template-columns: 1fr;
  }
}
.t-stat-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid #efeaf9;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: right;
  box-shadow: 0 2px 8px rgba(90, 70, 160, 0.04);
}
html.dark .t-stat-card {
  background: rgba(30, 24, 52, 0.75);
  border-color: rgba(255, 255, 255, 0.08);
}
.t-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.t-stat-icon.gold { background: #fef3c7; color: #d97706; }
.t-stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.t-stat-icon.green { background: #dcfce7; color: #16a34a; }
.t-stat-icon.pink { background: #fce7f3; color: #db2777; }
html.dark .t-stat-icon.gold { background: rgba(217, 119, 6, 0.2); color: #fbbf24; }
html.dark .t-stat-icon.purple { background: rgba(124, 58, 237, 0.2); color: #a78bfa; }
html.dark .t-stat-icon.green { background: rgba(22, 163, 74, 0.2); color: #4ade80; }
html.dark .t-stat-icon.pink { background: rgba(219, 39, 119, 0.2); color: #f472b6; }
.t-stat-body {
  display: flex;
  flex-direction: column;
}
.t-stat-num {
  font-size: 20px;
  font-weight: 800;
  color: #241d3b;
  line-height: 1.2;
}
html.dark .t-stat-num { color: #ffffff; }
.t-stat-lbl {
  font-size: 12px;
  color: #7b6f95;
  margin-top: 2px;
}
html.dark .t-stat-lbl { color: #9d92b5; }

/* Controls: Search, Sort & Chips */
.t-controls-wrap {
  margin-bottom: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.t-search-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.t-search-box {
  flex: 1;
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}
.t-search-box .material-icons {
  position: absolute;
  right: 14px;
  color: #9d92b5;
  pointer-events: none;
}
.t-search-box input {
  width: 100%;
  padding: 13px 44px 13px 40px;
  border-radius: 14px;
  border: 1px solid #e5def5;
  background: #ffffff;
  font-size: 14px;
  font-family: inherit;
  color: #241d3b;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}
.t-search-box input:focus {
  border-color: var(--colorA1, #7a5fd0);
  box-shadow: 0 0 0 3px rgba(160, 137, 229, 0.2);
}
html.dark .t-search-box input {
  background: #241d3b;
  border-color: #382f57;
  color: #f1ecff;
}
.t-search-clear {
  position: absolute;
  left: 12px;
  border: none;
  background: #ede9fe;
  color: #7c3aed;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
html.dark .t-search-clear {
  background: #3b2f62;
  color: #c4b5fd;
}
.t-sort-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e5def5;
  border-radius: 14px;
  padding: 0 14px;
}
html.dark .t-sort-box {
  background: #241d3b;
  border-color: #382f57;
}
.t-sort-box .material-icons { color: #9d92b5; font-size: 20px; }
.t-sort-box select {
  border: none;
  background: transparent;
  padding: 13px 4px;
  font-size: 14px;
  font-family: inherit;
  color: #241d3b;
  outline: none;
  cursor: pointer;
  font-weight: 600;
}
html.dark .t-sort-box select {
  color: #f1ecff;
}
.t-sort-box select option {
  background: #ffffff;
  color: #241d3b;
}
html.dark .t-sort-box select option {
  background: #241d3b;
  color: #f1ecff;
}

/* Filter Chips */
.t-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.t-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #e5def5;
  background: #ffffff;
  color: #554972;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.t-chip:hover {
  background: #f7f4fd;
  border-color: #d3c4f7;
  color: #7a5fd0;
}
.t-chip.active {
  background: linear-gradient(135deg, var(--colorA1, #a089e5) 0%, #7a5fd0 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(122, 95, 208, 0.25);
}
html.dark .t-chip {
  background: #241d3b;
  border-color: #382f57;
  color: #b7add4;
}
html.dark .t-chip:hover {
  background: #2e244d;
  color: #f1ecff;
}
html.dark .t-chip.active {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  color: #ffffff;
}
.t-chip-count {
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
}
.t-chip.active .t-chip-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Cards Grid */
.t-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 20px;
}
@media (max-width: 640px) {
  .t-grid {
    grid-template-columns: 1fr;
  }
}
.t-card {
  background: #ffffff;
  border: 1px solid #ebe5f7;
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(122, 95, 208, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.t-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(122, 95, 208, 0.12);
  border-color: #d1c4f5;
}
html.dark .t-card {
  background: #211a36;
  border-color: #352b53;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
html.dark .t-card:hover {
  border-color: #58458c;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
}

/* Watermark Quote */
.t-quote-watermark {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 64px;
  color: rgba(160, 137, 229, 0.08);
  pointer-events: none;
  line-height: 1;
}
html.dark .t-quote-watermark {
  color: rgba(255, 255, 255, 0.04);
}

/* Card Header */
.t-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.t-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.t-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.t-avatar--sm {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 14px;
}
.avatar-grad-1 { background: linear-gradient(135deg, #fbcfe8, #f472b6); color: #831843; }
.avatar-grad-2 { background: linear-gradient(135deg, #ddd6fe, #a78bfa); color: #4c1d95; }
.avatar-grad-3 { background: linear-gradient(135deg, #fed7aa, #fb923c); color: #7c2d12; }
.avatar-grad-4 { background: linear-gradient(135deg, #bbf7d0, #4ade80); color: #14532d; }
html.dark .avatar-grad-1 { background: linear-gradient(135deg, #831843, #db2777); color: #fdf2f8; }
html.dark .avatar-grad-2 { background: linear-gradient(135deg, #4c1d95, #7c3aed); color: #f5f3ff; }
html.dark .avatar-grad-3 { background: linear-gradient(135deg, #7c2d12, #ea580c); color: #fff7ed; }
html.dark .avatar-grad-4 { background: linear-gradient(135deg, #14532d, #16a34a); color: #f0fdf4; }

.t-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.t-user-name {
  font-size: 15px;
  font-weight: 800;
  color: #241d3b;
}
html.dark .t-user-name { color: #f5f2ff; }

.t-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #e8f8ee;
  color: #16a34a;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
html.dark .t-verified-badge {
  background: rgba(22, 163, 74, 0.18);
  color: #4ade80;
}

.t-city-row {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #8c81a9;
  font-size: 12px;
  margin-top: 2px;
}
html.dark .t-city-row { color: #9c91b7; }

.t-rating-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  padding: 4px 8px;
  border-radius: 10px;
}
html.dark .t-rating-pill {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.2);
}
.t-stars {
  color: #f59e0b;
  font-size: 14px;
  letter-spacing: 1px;
  direction: ltr;
}
.t-stars--lg {
  font-size: 20px;
  letter-spacing: 3px;
}
.t-rating-num {
  font-size: 12px;
  font-weight: 800;
  color: #b45309;
}
html.dark .t-rating-num { color: #fcd34d; }

/* Card Body */
.t-card-body {
  flex: 1;
}
.t-comment {
  color: #3b3252;
  line-height: 1.85;
  font-size: 14.5px;
  margin: 0;
  word-break: break-word;
}
html.dark .t-comment {
  color: #ded6f3;
}

/* Proof Section inside Card */
.t-proof-section {
  background: #fcfaff;
  border: 1px dashed #ded4f7;
  border-radius: 14px;
  padding: 10px;
}
html.dark .t-proof-section {
  background: #1c162e;
  border-color: #3a2e5c;
}
.t-proof-head {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--colorA1, #7a5fd0);
  margin-bottom: 8px;
}
html.dark .t-proof-head { color: #bcaaf8; }
.t-proof-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
}
.t-proof-img-wrap {
  position: relative;
  width: 100%;
  height: 160px;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.t-proof-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.t-proof-btn:hover .t-proof-img-wrap img {
  transform: scale(1.05);
  filter: brightness(0.85);
}
.t-proof-hover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(30, 20, 55, 0.45);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.t-proof-btn:hover .t-proof-hover-overlay {
  opacity: 1;
}

/* Card Footer */
.t-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #f3effa;
  font-size: 12px;
}
html.dark .t-card-footer {
  border-top-color: #2e2548;
}
.t-footer-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #15803d;
  background: #f0fdf4;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11px;
}
html.dark .t-footer-tag {
  background: rgba(22, 163, 74, 0.15);
  color: #86efac;
}
.t-footer-date {
  color: #a59cb8;
  font-size: 11.5px;
}

/* Empty State */
.t-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border-radius: 20px;
  border: 1px dashed #ded4f7;
  max-width: 500px;
  margin: 0 auto;
}
html.dark .t-empty-state {
  background: #211a36;
  border-color: #382e56;
}
.t-empty-state .material-icons {
  font-size: 52px;
  color: #a089e5;
  margin-bottom: 12px;
}
.t-empty-state h3 {
  font-size: 18px;
  font-weight: 800;
  color: #241d3b;
  margin: 0 0 6px;
}
html.dark .t-empty-state h3 { color: #f1ecff; }
.t-empty-state p {
  color: #7b6f95;
  font-size: 14px;
  margin: 0 0 16px;
}
.t-btn-reset {
  background: var(--colorA1, #7a5fd0);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Lightbox Modal */
.t-lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 10, 30, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: t-fadein 0.2s ease-out;
}
@keyframes t-fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}
.t-lightbox-container {
  background: #ffffff;
  border-radius: 22px;
  max-width: min(92vw, 760px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: t-popin 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes t-popin {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
html.dark .t-lightbox-container {
  background: #201a35;
  border-color: #3b2e5c;
}
.t-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #efeaf9;
  background: #faf8fd;
}
html.dark .t-lightbox-header {
  background: #282042;
  border-bottom-color: #352b53;
}
.t-lightbox-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.t-city-sub {
  font-size: 12px;
  color: #8c81a9;
}
.t-lightbox-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.t-lightbox-close {
  background: #f1edfb;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #554972;
  cursor: pointer;
  transition: all 0.15s ease;
}
.t-lightbox-close:hover {
  background: #e2d9f7;
  color: #241d3b;
}
html.dark .t-lightbox-close {
  background: #392e59;
  color: #d1c4f5;
}
html.dark .t-lightbox-close:hover {
  background: #4a3c75;
  color: #ffffff;
}
.t-lightbox-img-wrap {
  flex: 1;
  overflow: auto;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0d0a18;
}
.t-lightbox-fullimg {
  max-width: 100%;
  max-height: calc(82vh - 140px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}
.t-lightbox-footer {
  padding: 12px 18px;
  border-top: 1px solid #efeaf9;
  background: #faf8fd;
  text-align: center;
}
html.dark .t-lightbox-footer {
  background: #282042;
  border-top-color: #352b53;
}
.t-lightbox-quote {
  font-size: 13.5px;
  font-style: italic;
  color: #4a3e66;
  margin: 0 0 4px;
}
html.dark .t-lightbox-quote {
  color: #d1c4f5;
}
.t-lightbox-hint {
  font-size: 11px;
  color: #9d92b5;
}

/* ============ تفاصيل المنتج ============ */.product-detail { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; padding: 16px 0 40px; }
.product-detail-image { position: relative; }
.product-detail-image img { width: 100%; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.product-detail-promo {
  position: absolute; top: 14px; right: 14px; background: var(--colorWarmDark1, #b35900);
  color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
}
.product-detail-cat { color: var(--colorA1, #a089e5); font-weight: 700; font-size: 14px; text-decoration: none; }
.product-detail-info h1 { font-size: 28px; font-weight: 800; color: #2a2440; margin: 8px 0 16px; line-height: 1.4; }
.product-detail-price { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.price-now { font-size: 28px; font-weight: 800; color: var(--colorA1, #7a5fd0); }
.price-old { color: #b3a9c9; font-size:16px; }
.price-off { background: #ffe3ec; color: #d6336c; padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.stock-badge { display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; margin-bottom: 14px; }
.stock-badge.ok { background: #e3f6e9; color: #148a3f; }
.stock-badge.low { background: #fff2d9; color: #b35900; }
.stock-badge.out { background: #ffe3e3; color: #c0392b; }
.product-detail-desc { color: #5a4f78; line-height: 1.9; margin: 0 0 20px; }
.product-detail-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #e6e2f5; border-radius: 12px; background: #fff; }
.qty-control button {
  width: 40px; height: 40px; border: none; background: transparent; cursor: pointer;
  font-size: 18px; color: var(--colorA1, #7a5fd0); font-weight: 700;
}
.qty-control span { min-width: 34px; text-align: center; font-weight: 700; }
.btn-add-cart {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border: none;
  border-radius: 12px; background: var(--colorA1, #a089e5); color: #fff; cursor: pointer;
  font-family: inherit; font-size: 16px; font-weight: 700;
}
.btn-add-cart:disabled { background: #d5d0e4; cursor: not-allowed; }
.btn-wishlist {
  width: 46px; height: 46px; border-radius: 12px; border: 1px solid #e6e2f5; background: #fff;
  cursor: pointer; color: #b3a9c9; font-size: 20px; display: inline-flex; align-items: center; justify-content: center;
}
.btn-wishlist.active { color: #e0245e; }
.added-note { margin-top: 14px; color: #148a3f; font-weight: 700; }
.added-note.error { color: #c0392b; }

/* ============ السلة ============ */
.cart-page { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; padding: 16px 0 40px; }
.cart-items h1 { font-size: 26px; font-weight: 800; color: var(--colorA1, #7a5fd0); margin: 0 0 18px; }
.cart-item {
  display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid #f0ecfa;
  border-radius: 16px; padding: 12px; margin-bottom: 12px;
}
.cart-item img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title { font-weight: 700; color: #2a2440; text-decoration: none; display: block; }
.cart-item-cat { color: #b3a9c9; font-size: 13px; }
.cart-item-price { color: var(--colorA1, #7a5fd0); font-weight: 700; margin-top: 4px; }
.cart-item-total { font-weight: 800; color: #2a2440; min-width: 90px; text-align: center; }
.cart-item-remove { border: none; background: transparent; color: #c0392b; cursor: pointer; padding: 6px; }
.cart-summary { background: #fff; border: 1px solid #f0ecfa; border-radius: 16px; padding: 20px; align-self: start; }
.cart-summary h2 { margin: 0 0 14px; font-size: 18px; font-weight: 800; color: #2a2440; }
.cart-summary-row { display: flex; justify-content: space-between; padding: 8px 0; color: #5a4f78; }
.btn-checkout {
  display: block; width: 100%; padding: 14px; border: none; border-radius: 12px;
  background: var(--colorA1, #a089e5); color: #fff; font-family: inherit; font-size: 16px;
  font-weight: 700; cursor: pointer; margin-top: 12px; text-align: center;
}
.btn-checkout:disabled { background: #d5d0e4; cursor: not-allowed; }
.btn-continue { display: block; text-align: center; margin-top: 10px; color: var(--colorA1, #a089e5); font-weight: 700; text-decoration: none; }

/* ============ المفضلة ============ */
.wishlist-card { position: relative; }
.wishlist-remove {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; border: none;
  background: transparent; color: #c0392b; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 700;
}

/* ============ إتمام الطلب ============ */
.checkout-page { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; padding: 16px 0 40px; }
.checkout-form { background: #fff; border: 1px solid #f0ecfa; border-radius: 16px; padding: 24px; }
.checkout-form h1 { font-size: 24px; font-weight: 800; color: var(--colorA1, #7a5fd0); margin: 0 0 18px; }
.checkout-form label { display: block; font-weight: 700; color: #4a3f66; margin: 12px 0 6px; font-size: 14px; }
.input, .textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid #e6e2f5;
  background: #fff; font-family: inherit; font-size: 15px; box-sizing: border-box;
}
.textarea { min-height: 90px; resize: vertical; }
.grid-2sm { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkout-gps { position: relative; }
.checkout-gps input { padding-left: 46px; }
.checkout-gps-btn {
  position: absolute; top: 50%; left: 8px; transform: translateY(-50%);
  width: 34px; height: 34px; border: 1px solid #e6e2f5; border-radius: 10px;
  background: #fff; color: #7a5fd0; cursor: pointer; font-size: 14px; transition: .2s ease;
}
.checkout-gps-btn:hover { border-color: #7a5fd0; background: #f3effc; }
.checkout-gps-btn:active { background: #e6ddf8; }
.checkout-locating { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: #7a5fd0; font-size: 12px; }
.checkout-summary { background: #fff; border: 1px solid #f0ecfa; border-radius: 16px; padding: 20px; align-self: start; }
.checkout-summary h2 { margin: 0 0 14px; font-size: 18px; font-weight: 800; color: #2a2440; }
.checkout-line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 14px; color: #5a4f78; }
.checkout-line small { color: #b3a9c9; }
.checkout-total {
  display: flex; justify-content: space-between; border-top: 1px solid #f0ecfa;
  padding-top: 12px; margin-top: 8px; font-weight: 800; color: #2a2440;
}
.checkout-confirm { text-align: center; padding: 60px 20px; }
.confirm-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px;
  border-radius: 50%; background: #e3f6e9; color: #148a3f; font-size: 30px; margin-bottom: 16px;
}
.checkout-confirm h1 { color: var(--colorA1, #7a5fd0); margin: 0 0 10px; }
.checkout-confirm p { color: #5a4f78; margin: 6px 0; }
.checkout-confirm .btn-checkout { max-width: 260px; margin: 20px auto 0; }

/* ============ استجابة الجوال ============ */
@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; }
  .cart-page, .checkout-page { grid-template-columns: 1fr; }
  .grid-2sm { grid-template-columns: 1fr; }
}

/* ============ صفحة تسجيل دخول المتجر (مطابقة للملف المرجعي) ============ */
.auth-page {
    position: relative;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    overflow: hidden;
    background: #0f0a13;
    color: #ffffff;
    font-family: 'Cairo', sans-serif;
    box-sizing: border-box;
}

.auth-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}
.auth-blob-one {
    width: 420px;
    height: 420px;
    top: -180px;
    right: -120px;
    background: rgba(113, 65, 132, 0.35);
}
.auth-blob-two {
    width: 430px;
    height: 430px;
    bottom: -220px;
    left: -100px;
    background: rgba(84, 32, 111, 0.45);
}

.auth-shell {
    position: relative;
    display: grid;
    width: min(100%, 1120px);
    min-height: 720px;
    grid-template-columns: .92fr 1.08fr;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 28px;
    background: #181021;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
}

.auth-aside {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
    background: linear-gradient(135deg, #4a176b, #612783 55%, #8a548f);
    color: white;
}

.auth-brand-mini {
    display: flex;
    direction: ltr;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
    font-weight: bold;
    letter-spacing: 1px;
}
.auth-shield {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, .15);
}
.auth-tag {
    display: inline-block;
    border-radius: 999px;
    padding: 7px 16px;
    background: rgba(110, 231, 183, 0.15);
    color: #6ee7b7;
    font-size: 12px;
    font-weight: bold;
}
.auth-aside h2 {
    margin: 22px 0 0;
    font-size: 38px;
    line-height: 1.3;
}
.auth-aside p {
    max-width: 330px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, .8);
    font-size: 16px;
    line-height: 1.8;
}
.auth-features {
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 22px;
    background: rgba(255, 255, 255, .10);
}
.auth-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    font-size: 14px;
    font-weight: bold;
}
.auth-check {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: #6ee7b7;
    color: #11382b;
    font-size: 12px;
}

.auth-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 54px;
}
.auth-login {
    width: min(100%, 475px);
}
.auth-head {
    text-align: center;
}
.auth-logo-wrap {
    display: flex;
    width: 280px;
    height: 145px;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}
.auth-logo-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.auth-secure {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(110, 231, 183, 0.12);
    color: #6ee7b7;
    font-size: 12px;
    font-weight: bold;
}
.auth-head h1 {
    margin: 16px 0 0;
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
}
.auth-subtitle {
    margin: 8px 0 0;
    color: #a18aab;
    font-size: 14px;
}
.auth-socials {
    display: grid;
    gap: 11px;
    margin-top: 24px;
}
.auth-social {
    display: flex;
    width: 100%;
    height: 48px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid #3f2a47;
    border-radius: 12px;
    background: #23162f;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    transition: .2s ease;
}
.auth-social:hover {
    background: #2d1a38;
    border-color: #5c3b6b;
}
.auth-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 16px;
}
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: #a18aab;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    height: 1px;
    flex: 1;
    background: #3f2a47;
}
.auth-field {
    margin-bottom: 12px;
}
.auth-sep {
    height: 1px;
    border: 0;
    background: #3f2a47;
    margin: 6px 0 20px;
}
.auth-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: start;
}
.auth-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.auth-field-head label {
    color: #d8c7e0;
    font-size: 13px;
    font-weight: 600;
}
.auth-forgot {
    border: 0;
    padding: 0;
    background: transparent;
    color: #b886cd;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}
.auth-forgot:hover {
    text-decoration: underline;
}
.auth-input-wrap {
    position: relative;
}
.auth-input-wrap input {
    width: 100%;
    height: 50px;
    border: 1px solid #3f2a47;
    border-radius: 12px;
    outline: none;
    background: #23162f;
    padding: 0 44px;
    color: #ffffff;
    font-size: 14px;
    text-align: right;
    font-family: inherit;
    box-sizing: border-box;
}
.auth-input-wrap input::placeholder {
    color: #795e86;
}
.auth-input-wrap input:focus {
    border-color: #8e54a8;
    box-shadow: 0 0 0 3px rgba(142, 84, 168, .2);
}
.auth-input-wrap label {
    position: absolute;
    top: 50%;
    right: 44px;
    transform: translateY(-50%);
    color: #8a6c99;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    white-space: nowrap;
    transition: top .15s ease-out, transform .15s ease-out, font-size .15s ease-out, color .15s ease-out, padding .15s ease-out, background .15s ease-out;
    z-index: 1;
    padding: 0;
    line-height: 1;
}
.auth-input-wrap input:focus ~ label,
.auth-input-wrap input:not(:placeholder-shown) ~ label {
    top: 0;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #b886cd;
    background: #23162f;
    padding: 0 8px;
    border-radius: 5px;
}
.auth-input-wrap input:focus ~ label {
    color: #6ee7b7;
}
.auth-input-wrap .auth-forgot {
    display: none;
}
.auth-forgot {
    display: block;
    margin-top: 8px;
    border: 0;
    padding: 0;
    background: transparent;
    color: #b886cd;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: right;
}
.auth-forgot:hover {
    color: #6ee7b7;
    text-decoration: underline;
}
.auth-field-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    color: #8a6c99;
    transform: translateY(-50%);
    font-size: 15px;
}
.auth-password-toggle {
    position: absolute;
    top: 50%;
    left: 12px;
    border: 0;
    background: transparent;
    color: #8a6c99;
    transform: translateY(-50%);
    cursor: pointer;
    padding: 4px;
    font-size: 15px;
}
.auth-password-toggle:hover {
    color: #ffffff;
}
.auth-social-note {
    margin: -8px 0 18px;
    color: #a18aab;
    font-size: 12.5px;
    text-align: center;
    line-height: 1.7;
}
.auth-field-row .auth-field {
    min-width: 0;
}
@media (max-width: 560px) {
    .auth-field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
.auth-input-gps input {
    padding-left: 52px;
}
.auth-gps-btn {
    position: absolute;
    top: 50%;
    left: 10px;
    width: 36px;
    height: 36px;
    border: 1px solid #3f2a47;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #6ee7b7;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 14px;
    transition: .2s ease;
}
.auth-gps-btn:hover {
    border-color: #6ee7b7;
    background: rgba(110, 231, 183, 0.12);
}
.auth-gps-btn:active {
    background: rgba(110, 231, 183, 0.25);
}
.auth-locating {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: #6ee7b7;
    font-size: 12px;
    font-weight: 600;
}
.auth-primary {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 12px;
    background: #714184;
    color: #fff;
    box-shadow: 0 9px 18px rgba(113, 65, 132, 0.3);
    font-size: 15px;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    margin-top: 8px;
    transition: .2s ease;
}
.auth-primary:hover {
    background: #54206f;
    transform: translateY(-1px);
}
.auth-notice {
    margin: 0 0 14px;
    border-radius: 12px;
    padding: 12px;
    background: rgba(110, 231, 183, 0.15);
    color: #6ee7b7;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
}
.auth-footer {
    margin-top: 20px;
    border-top: 1px solid #3f2a47;
    padding-top: 18px;
    color: #a18aab;
    text-align: center;
    font-size: 13px;
}
.auth-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: #c48bd9;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
}
.auth-link:hover {
    text-decoration: underline;
}
.auth-alt {
    display: block;
    width: 100%;
    margin-top: 12px;
    border: 1px solid #3f2a47;
    border-radius: 12px;
    padding: 12px;
    background: transparent;
    color: #a18aab;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: .2s ease;
}
.auth-alt:hover {
    border-color: #8e54a8;
    color: #ffffff;
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 620px;
    }
    .auth-aside {
        display: none;
    }
    .auth-content {
        padding: 34px 30px;
    }
}
@media (max-width: 460px) {
    .auth-page {
        padding: 0;
    }
    .auth-shell {
        min-height: 100vh;
        border-radius: 0;
    }
    .auth-content {
        padding: 26px 20px;
    }
    .auth-logo-wrap {
        width: 220px;
        height: 112px;
    }
    .auth-head h1 {
        font-size: 22px;
    }
}

/* ============ ديالوج تسجيل الدخول / إنشاء حساب ============ */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 5, 14, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.auth-modal-box {
    position: relative;
    width: min(100%, 1120px);
    max-height: 94vh;
    overflow-y: auto;
    border-radius: 28px;
}
.auth-modal-close {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 5;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
    transition: .2s ease;
}
.auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.24);
}
.auth-modal-box .auth-shell {
    width: 100%;
}
@media (max-width: 900px) {
    .auth-modal-overlay {
        padding: 10px;
    }
    .auth-modal-box {
        max-height: 96vh;
    }
}
@media (max-width: 460px) {
    .auth-modal-overlay {
        padding: 0;
    }
    .auth-modal-box {
        max-height: 100vh;
        border-radius: 0;
    }
    .auth-modal-box .auth-shell {
        min-height: 100vh;
        border-radius: 0;
    }
}


/* ============ ديالوج سياسة المتجر ============ */
.policy-modal-box {
    width: min(100%, 640px);
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    color: #2a2440;
}
.policy-modal-box .auth-modal-close {
    background: rgba(10, 5, 14, 0.06);
    color: #2a2440;
}
.policy-modal-box .auth-modal-close:hover {
    background: rgba(10, 5, 14, 0.12);
}
html.dark .policy-modal-box {
    background: #1c1d2a;
    color: #f1ecff;
}
html.dark .policy-modal-box .auth-modal-close {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}
html.dark .policy-modal-box .auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.24);
}
.policy-modal-head {
    text-align: center;
    margin-bottom: 22px;
}
.policy-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, #a78bfa 0%, #7a5fd0 100%);
    color: #fff;
    font-size: 24px;
    margin-bottom: 12px;
    box-shadow: 0 8px 24px rgba(122, 95, 208, 0.35);
}
.policy-modal-head h2 {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 800;
}
.policy-modal-head p {
    margin: 0;
    font-size: 13px;
    color: #8a8499;
}
html.dark .policy-modal-head p { color: #a29bb8; }
.policy-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.policy-block {
    background: #f8f6ff;
    border: 1px solid #ede8fb;
    border-radius: 18px;
    padding: 18px 20px;
}
html.dark .policy-block {
    background: #23243a;
    border-color: #32344e;
}
.policy-block h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 800;
    color: #7a5fd0;
}
html.dark .policy-block h3 { color: #c4b5fd; }
.policy-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.policy-list li {
    position: relative;
    padding-right: 24px;
    font-size: 13.5px;
    line-height: 1.7;
    color: #4a4460;
}
html.dark .policy-list li { color: #d5d0e6; }
.policy-list li::before {
    content: "\f058";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 2px;
    font-size: 14px;
    color: #a78bfa;
}
@media (max-width: 460px) {
    .policy-modal-box {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
        padding: 20px 16px;
    }
}


/* ============ ديالوج المفضلة ============ */
.wishlist-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px 20px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    overflow-y: auto;
}
.wishlist-dialog-box {
    position: relative;
    width: min(100%, 560px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    animation: wishlistPop .22s cubic-bezier(.16,1,.3,1);
}
@keyframes wishlistPop { from { opacity:0; transform: translateY(-10px) scale(.98); } to { opacity:1; transform: translateY(0) scale(1); } }
.wishlist-dialog-close {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: #ef4444;
    color: #ffffff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    z-index: 2;
}
.wishlist-dialog-header {
    background: #a78bfa;
    color: #ffffff;
    text-align: center;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .2px;
}
.wishlist-dialog-body {
    padding: 16px;
    max-height: 62vh;
    overflow-y: auto;
}
.wishlist-dialog-empty {
    text-align: center;
    padding: 30px 16px;
    color: #64748b;
}
.wishlist-dialog-empty .material-icons { font-size: 42px; color: #c4b5fd; margin-bottom: 10px; }
.wishlist-dialog-empty p { margin: 0 0 14px; font-size: 14px; font-weight: 600; }
.wishlist-dialog-empty a { display:inline-flex; padding:10px 18px; background:#7c3aed; color:#fff; border-radius:999px; font-weight:700; font-size:13px; }
.wishlist-dialog-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    margin-bottom: 10px;
    background: #ffffff;
}
.wishlist-dialog-item:last-child { margin-bottom: 0; }
.wishlist-dialog-img { flex-shrink:0; width:64px; height:64px; border-radius:10px; overflow:hidden; background:#f8fafc; border:1px solid #f1f5f9; }
.wishlist-dialog-img img { width:100%; height:100%; object-fit:contain; }
.wishlist-dialog-info { flex:1; min-width:0; }
.wishlist-dialog-title { display:block; font-size:13px; font-weight:700; color:#1e293b; text-decoration:none; line-height:1.4; margin-bottom:4px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.wishlist-dialog-title:hover { color:#7c3aed; }
.wishlist-dialog-price { display:flex; align-items:center; gap:8px; font-size:13px; }
.wishlist-dialog-price .price-now { color:#7c3aed; font-weight:800; }
.wishlist-dialog-price del { color:#94a3b8; font-size:12px; }
.wishlist-dialog-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.wishlist-action-btn { width:36px; height:36px; border-radius:10px; border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:.2s; }
.wishlist-action-btn .material-icons { font-size:18px; }
.wishlist-action-btn.delete { background:#fef2f2; color:#ef4444; }
.wishlist-action-btn.delete:hover { background:#fee2e2; }
.wishlist-action-btn.cart { background:#f5f3ff; color:#7c3aed; }
.wishlist-action-btn.cart:hover { background:#ede9fe; }
html.dark .wishlist-dialog-box { background:#1e1b2e; }
html.dark .wishlist-dialog-item { background:#252340; border-color:#2e2b4d; }
html.dark .wishlist-dialog-title { color:#f1f5f9; }
@media (max-width: 480px) { .wishlist-dialog-overlay{padding:20px 10px;} .wishlist-dialog-box{border-radius:16px;} }

/* ---------- ���� ������ ---------- */
.my-orders { max-width: 860px; margin: 0 auto; padding: 30px 16px; }
.my-orders h1 { margin: 0; color: #2a2440; font-size: 26px; }
.my-orders-sub { margin: 6px 0 24px; color: #5a4f78; font-size: 14px; }
.order-track-card {
    background: #fff; border: 1px solid #f0ecfa; border-radius: 16px;
    padding: 20px; margin-bottom: 18px; box-shadow: 0 8px 24px rgba(90, 70, 170, 0.07);
}
.order-track-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.order-track-id { color: #2a2440; font-size: 17px; }
.order-track-date { margin: 4px 0 0; color: #8b82a8; font-size: 13px; }
.order-track-status {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
    border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.order-track-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-review { background: #fff4e0; color: #b96a00; }
.status-shipping { background: #e8f0fe; color: #1a56db; }
.status-done { background: #e6f7ec; color: #148a3f; }

.order-steps { display: flex; align-items: flex-start; margin-top: 22px; }
.order-step { flex: 1; text-align: center; position: relative; }
.order-step:not(:last-child)::after {
    content: ""; position: absolute; top: 15px; inset-inline-start: 50%;
    width: 100%; height: 2px; background: #efe9fb;
}
.order-step.done:not(:last-child)::after { background: #7a5fd0; }
.order-step-dot {
    position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%; font-size: 13px; font-weight: 700;
    background: #f3effc; color: #a99fc4; border: 2px solid #e6ddf8;
}
.order-step.done .order-step-dot { background: #7a5fd0; border-color: #7a5fd0; color: #fff; }
.order-step.current .order-step-dot { background: #7a5fd0; border-color: #7a5fd0; color: #fff; box-shadow: 0 0 0 4px rgba(122,95,208,0.18); animation: pulseDot 1.6s infinite; }
@keyframes pulseDot { 0%{box-shadow:0 0 0 4px rgba(122,95,208,0.18)} 50%{box-shadow:0 0 0 8px rgba(122,95,208,0.08)} 100%{box-shadow:0 0 0 4px rgba(122,95,208,0.18)} }
.order-step.cancelled .order-step-dot { background: #fef2f2; border-color: #fecaca; color: #ef4444; }
.order-step.cancelled:not(:last-child)::after { background: #fecaca; }
.order-step.cancelled span { color: #ef4444; font-weight: 700; }
.order-step span { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; color: #8b82a8; }
.order-step.done span { color: #2a2440; }
.order-step.current span { color: #7a5fd0; font-weight: 800; }
/* OTO sub-label under step */
.order-step small.oto-sub { display:block; margin-top:4px; font-size:10px; color:#7a5fd0; background:#f5f3ff; padding:2px 6px; border-radius:999px; border:1px solid #e9ddff; }

.order-track-items { margin-top: 18px; border-top: 1px dashed #efe9fb; padding-top: 10px; }
.order-track-item { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 14px; color: #5a4f78; }
.order-track-item small { color: #b3a9c9; }
.order-track-item b { color: #2a2440; }
.order-track-foot {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    margin-top: 12px; padding-top: 14px; border-top: 1px solid #f0ecfa; font-size: 14px;
    color: #5a4f78; flex-wrap: wrap;
}
.order-track-foot b { color: #7a5fd0; }

/* ---------- ���� ����� ������ ---------- */
.profile-page { max-width: 1040px; margin: 0 auto; padding: 30px 16px; }
.profile-eyebrow { margin: 0; color: #9185dd; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; }
.profile-heading { margin: 6px 0 4px; color: #2a2440; font-size: 28px; }
.profile-layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 20px; margin-top: 24px; align-items: start; }
.profile-side, .profile-main { display: grid; align-content: start; gap: 18px; }
.profile-card {
    background: #fff; border: 1px solid #f0ecfa; border-radius: 16px;
    box-shadow: 0 10px 28px rgba(90, 70, 170, 0.08); overflow: hidden;
}
.profile-cover {
    height: 90px;
    background: radial-gradient(circle at 25% 15%, rgba(122, 95, 208, 0.35), transparent 42%),
                linear-gradient(120deg, #7a5fd0, #b18cd9 60%, #e8ddf8);
}
.profile-body { position: relative; padding: 0 20px 22px; text-align: center; }
.profile-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 92px; height: 92px; margin-top: -46px; border-radius: 50%;
    border: 4px solid #fff; box-shadow: 0 0 0 1px #d9ccf0;
    background: linear-gradient(135deg, #7a5fd0, #b18cd9); color: #fff;
    font-size: 26px; font-weight: 800;
}
.profile-name { margin: 14px 0 4px; color: #2a2440; font-size: 20px; }
.profile-email { margin: 0; color: #8b82a8; font-size: 14px; direction: ltr; }
.profile-badge {
    display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
    padding: 7px 14px; border-radius: 8px; background: #e6f7ec; color: #148a3f;
    border: 1px solid #bfe8cc; font-size: 12px; font-weight: 700;
}
.profile-badge i { width: 7px; height: 7px; border-radius: 50%; background: #148a3f; }

.profile-benefits { padding: 18px 20px; }
.profile-benefits-title { display: block; color: #2a2440; font-size: 14px; margin-bottom: 4px; }
.profile-benefit {
    display: flex; justify-content: space-between; gap: 10px;
    padding: 11px 0; border-top: 1px solid #f5f1fb; font-size: 13px;
}
.profile-benefit p { margin: 0; color: #5a4f78; }
.profile-benefit span { color: #7a5fd0; font-weight: 700; font-size: 12px; }

.profile-tracking { padding: 22px; }
.profile-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.profile-live { display: inline-flex; align-items: center; gap: 7px; color: #7a5fd0; font-size: 12px; font-weight: 700; }
.profile-order-title { margin: 10px 0 4px; color: #2a2440; font-size: 20px; }
.profile-order-date { margin: 0; color: #8b82a8; font-size: 13px; }
.profile-tracking-foot {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    margin-top: 18px; padding-top: 14px; border-top: 1px solid #f5f1fb;
}
.profile-link { color: #7a5fd0; font-weight: 700; font-size: 14px; text-decoration: none; }
.profile-link:hover { text-decoration: underline; }

.profile-section { padding: 22px; }
.profile-section-title { margin: 0 0 4px; color: #2a2440; font-size: 18px; }
.profile-form { margin-top: 16px; }
.profile-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.profile-field { display: grid; gap: 7px; min-width: 0; }
.profile-field label { color: #5a4f78; font-size: 13px; font-weight: 700; }
.profile-field-full { grid-column: 1 / -1; }
.profile-field input:disabled { background: #f4f1f9; color: #8b82a8; }
.profile-muted { color: #8b82a8; font-size: 13px; margin: 8px 0 14px; }
.btn-ghost-profile {
    border: 1px solid #e6ddf8; background: #fff; color: #7a5fd0;
    border-radius: 10px; padding: 10px 16px; font-size: 14px; font-weight: 700; cursor: pointer;
    transition: all 0.15s;
}
.btn-ghost-profile:hover { background: #f3effc; }

@media (max-width: 900px) {
    .profile-layout { grid-template-columns: 1fr; }
    .profile-side { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
    .profile-side { grid-template-columns: 1fr; }
    .profile-form-grid { grid-template-columns: 1fr; }
    .profile-tracking, .profile-section { padding: 18px; }
}

/* ============ ديالوج تغيير كلمة المرور ============ */
.pwd-overlay {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: rgba(18, 12, 32, 0.58);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    animation: pwdFade .22s ease;
}
@keyframes pwdFade { from{opacity:0} to{opacity:1} }
.pwd-box {
    position: relative; width: min(100%, 440px);
    background: #ffffff; border-radius: 22px;
    box-shadow: 0 24px 60px rgba(30, 20, 70, 0.28);
    overflow: hidden; animation: pwdPop .28s cubic-bezier(.16,1,.3,1);
}
@keyframes pwdPop { from{opacity:0; transform: translateY(10px) scale(.97)} to{opacity:1; transform: translateY(0) scale(1)} }
.pwd-close {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid #ede8fb; background: #fff; color: #6b6a7a;
    cursor: pointer; display:flex; align-items:center; justify-content:center; font-size:13px;
    transition: all .2s;
}
.pwd-close:hover { background:#f5f3ff; border-color:#d9ccf0; color:#1e1b2e; transform: rotate(90deg); }
.pwd-head {
    text-align: center; padding: 28px 24px 20px;
    background: linear-gradient(135deg, #7a5fd0 0%, #a78bfa 55%, #c4b5fd 100%);
    color: #fff; position: relative; overflow:hidden;
}
.pwd-head::before{
    content:""; position:absolute; inset:0;
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.22), transparent 40%);
}
.pwd-head > *{ position: relative; z-index:1; }
.pwd-icon {
    width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px;
    background: rgba(255,255,255,0.18); border:1px solid rgba(255,255,255,0.28);
    backdrop-filter: blur(6px); display:flex; align-items:center; justify-content:center;
    font-size:22px; color:#fff; box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.pwd-head h2 { margin:0 0 6px; font-size:22px; font-weight:900; letter-spacing:-.3px; }
.pwd-head p { margin:0; font-size:13px; opacity:.92; font-weight:600; }
.pwd-form { padding: 22px 22px 20px; display:grid; gap:16px; }
.pwd-field { display:grid; gap:7px; }
.pwd-field label { font-size:13px; font-weight:800; color:#2a2440; }
.pwd-input-wrap {
    position:relative; display:flex; align-items:center;
    border:1.5px solid #e9ddff; background:#fcfbff; border-radius:14px;
    transition: border-color .2s, box-shadow .2s, background .2s;
    overflow:hidden;
}
.pwd-input-wrap:focus-within { border-color:#a78bfa; background:#fff; box-shadow: 0 0 0 4px rgba(167,139,250,0.16); }
.pwd-input-icon {
    width:42px; height:46px; display:flex; align-items:center; justify-content:center;
    color:#7a5fd0; font-size:14px; flex-shrink:0; background:transparent;
}
.pwd-input-wrap input {
    flex:1; border:none; background:transparent; outline:none;
    padding: 12px 8px 12px 0; font-size:14px; font-weight:600; color:#1e1b2e;
}
.pwd-input-wrap input::placeholder { color:#b8b1cc; font-weight:500; }
.pwd-eye {
    width:42px; height:46px; border:none; background:transparent; cursor:pointer;
    color:#8b82a8; display:flex; align-items:center; justify-content:center; font-size:15px;
    transition: color .2s;
}
.pwd-eye:hover { color:#7a5fd0; }
.pwd-hint { font-size:11.5px; color:#8b82a8; font-weight:600; }
.pwd-notice { padding:10px 14px; border-radius:12px; font-size:13px; font-weight:700; line-height:1.5; }
.pwd-notice.error { background:#fef2f2; color:#b91c1c; border:1px solid #fecaca; }
.pwd-notice.success { background:#ecfdf5; color:#047857; border:1px solid #a7f3d0; }
.pwd-actions { display:grid; gap:10px; margin-top:4px; }
.pwd-submit {
    width:100%; padding:13px 16px; border-radius:14px; border:none;
    background: linear-gradient(135deg,#7a5fd0,#a78bfa); color:#fff;
    font-size:14px; font-weight:900; cursor:pointer;
    box-shadow: 0 10px 24px rgba(122,95,208,0.30); transition: transform .2s, box-shadow .2s, opacity .2s;
}
.pwd-submit:hover:not(:disabled){ transform: translateY(-1px); box-shadow:0 14px 32px rgba(122,95,208,0.38); }
.pwd-submit:disabled{ opacity:.6; cursor:not-allowed; transform:none; }

html.dark .pwd-box{ background:#1e1b2e; border:1px solid #303142; }
html.dark .pwd-field label{ color:#ecebf4; }
html.dark .pwd-input-wrap{ background:#151620; border-color:#303142; }
html.dark .pwd-input-wrap:focus-within{ background:#1a1b26; border-color:#7a5fd0; }
html.dark .pwd-input-wrap input{ color:#ecebf4; }

@media (max-width:480px){ .pwd-overlay{ padding:12px; } .pwd-box{ border-radius:18px; } .pwd-form{ padding:18px; } }

/* ============ زر تبديل المظهر ============ */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; margin-inline-start: 8px; border-radius: 50%;
  border: 1px solid var(--colorC2); background: #fff; color: var(--colorB1);
  cursor: pointer; transition: all .2s;
}
.theme-toggle:hover { border-color: var(--colorA1); color: var(--colorA1); background: #f3effc; }
.theme-toggle .material-icons { font-size: 20px; }

.menu-theme-toggle {
  display: flex; align-items: center; width: 100%; border: none; background: transparent;
  color: inherit; font-family: inherit; font-size: inherit; padding: 12px 20px; cursor: pointer; text-align: right;
}
.menu-theme-toggle:hover { background: rgba(160, 137, 229, 0.12); }

/* ============ شريط الجوال (الفئات + البروفايل + المظهر) ============ */
.mobile-top-row {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-bottom: 1px solid var(--colorC2);
  padding: 4px 8px 6px; margin-top: 8px;
}
.mobile-top-row .top-list-wrapper { flex: 1; min-width: 0; }
.mobile-top-row .top-list { margin-top: 0; }
.mobile-utility-inline { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.mobile-utility-inline .theme-toggle { margin-inline-start: 0; }

/* ============ تخطيط الفوتر اللاصق ============ */
.site-shell { display: flex; flex-direction: column; min-height: 100vh; }
.site-shell #center { flex: 1 0 auto; }

@media (max-width: 1024px) {
  .profile-menu { left: auto; right: 0; }
  .site-shell { min-height: calc(100vh - 85px); }
}

/* ============ الوضع الداكن ============ */
html.dark {
  --colorB1: #ecebf4;
  --colorB2: #2e2f3f;
  --colorC1: #8f8fa3;
  --colorC2: #303142;
  --colorC3: #23232f;
  --colorSuccessLight: #14301f;
  --colorSuccessDark1: #4cd787;
  --colorSuccessDark2: #4cd787;
}

html.dark body { background: #12131a; color: var(--colorB1); }
html.dark a { color: #a99aec; }
html.dark .mobile-top-row { background: #1a1b26; border-bottom-color: #303142; }
html.dark .toolbar-option { background-color: #45366f; }
html.dark .toolbar-option .wishlist-icon .material-icons,
html.dark .toolbar-option .cart-icon .material-icons,
html.dark .toolbar-option .wishlist-icon-text,
html.dark .toolbar-option .cart-icon-text { color: #fff; }

/* ---------- الهيدر ---------- */
html.dark .toolbar-option-wrapper { background: #1a1b26; }
html.dark .header-logo-sc { background: #1a1b26; box-shadow: 0 2px 3px -2px #000; }
html.dark .search-form-input { background: #151620; color: #ecebf4; }
html.dark .search-form-input::placeholder { color: #7a7b8c; }
html.dark .search-icon, html.dark .search-cancel { color: #ecebf4; }
html.dark .top-list a { box-shadow: none; }

/* ---------- القوائم ---------- */
html.dark .site-menu-float { background: #1a1b26; }
html.dark .site-menu-float .menu-heading { background: #2e2f3f; color: #fff; }
html.dark .site-menu-float ul li a:hover { background: rgba(160, 137, 229, 0.12); }
html.dark .site-menu-float .menu-social .socialicon { filter: brightness(0.95); }
html.dark .site-menu li { background: #1a1b26; }
html.dark .site-menu li:hover { background: #23232f; }
html.dark .site-menu li.title { background: #2e2f3f; color: #fff; }
html.dark .site-menu li.title a { color: #fff; }
html.dark .site-quick-list a { background: #1a1b26; border-color: #303142; box-shadow: none; }

/* ---------- الكاروسيل والأقسام ---------- */
html.dark .carousel-wrapper { background: #1a1b26; box-shadow: 0 0 2px #3a3b4c; }
html.dark .carousel-dots button { background: #3a3b4c; }
html.dark .product-index-block-title { background: #2e2f3f; color: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); }
html.dark .product-index-block-title:hover { background: #3a3b4c; }
html.dark .product-index-block-show-all-bottom { background: #1a1b26; }
html.dark .product-index-block-show-all-bottom:hover { background: #23232f; }

/* ---------- بطاقات المنتجات ---------- */
html.dark .product-brief-content { background: #1a1b26; box-shadow: 0 0 2px #3a3b4c; }
html.dark .product-brief-content:hover { box-shadow: 0 0 4px #4cd787; }
html.dark .title h2 a { color: #ecebf4; }
html.dark .price del { color: #b9bac6; }
html.dark .wishlist-toggle { background: rgba(255, 255, 255, 0.06); }
html.dark .buy-button .button { background: var(--colorA1); color: #fff; }

/* ---------- الفوتر ---------- */
html.dark .footer-wrapper { background: #1a1b26; }

/* ---------- قائمة البروفايل في الهيدر ---------- */
html.dark .profile-menu { background: #1a1b26; border-color: rgba(255, 255, 255, 0.1); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5); }
html.dark .profile-menu-head { border-bottom-color: rgba(255, 255, 255, 0.08); }
html.dark .profile-menu-info b { color: #ecebf4; }
html.dark .profile-menu-info span { color: #8f8fa3; }
html.dark .profile-menu-item { color: #ff8a80; }
html.dark .profile-menu-item:hover { background: #2a1a1a; }

/* ---------- مؤشر التحميل والفارغ ---------- */
html.dark .loading-spinner { border-color: #2e2f3f; }
html.dark .empty-state p { color: #a1a2b3; }

/* ---------- صفحة المنتجات ---------- */
html.dark .products-search, html.dark .products-select { background: #151620; border-color: #303142; color: #ecebf4; }
html.dark .products-select option { background: #1a1b26; }
html.dark .products-head p { color: #a1a2b3; }
html.dark .chip { background: #23232f; color: #c3bce0; }
html.dark .chip:hover { background: #2e2f3f; }

/* ---------- تفاصيل المنتج ---------- */
html.dark .product-detail-image img { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
html.dark .product-detail-info h1 { color: #ecebf4; }
html.dark .product-detail-desc { color: #b9bac6; }
html.dark .price-old { color: #8f8fa3; }
html.dark .price-off { background: #46202e; color: #ff8a80; }
html.dark .stock-badge.ok { background: #14301f; color: #4cd787; }
html.dark .stock-badge.low { background: #3a2c14; color: #ffc46b; }
html.dark .stock-badge.out { background: #3a1a1a; color: #ff8a80; }
html.dark .qty-control { background: #151620; border-color: #303142; }
html.dark .btn-add-cart:disabled { background: #3a3b4c; }
html.dark .btn-wishlist { background: #151620; border-color: #303142; color: #8f8fa3; }

/* ---------- السلة ---------- */
html.dark .cart-item { background: #1a1b26; border-color: #303142; }
html.dark .cart-item-title, html.dark .cart-item-total { color: #ecebf4; }
html.dark .cart-item-cat { color: #8f8fa3; }
html.dark .cart-summary { background: #1a1b26; border-color: #303142; }
html.dark .cart-summary h2, html.dark .checkout-summary h2 { color: #ecebf4; }
html.dark .cart-summary-row, html.dark .checkout-line { color: #b9bac6; }
html.dark .btn-checkout:disabled { background: #3a3b4c; }

/* ---------- إتمام الطلب ---------- */
html.dark .checkout-form, html.dark .checkout-summary { background: #1a1b26; border-color: #303142; }
html.dark .checkout-form label { color: #d6d2e6; }
html.dark .input, html.dark .textarea { background: #151620; border-color: #303142; color: #ecebf4; }
html.dark .input::placeholder, html.dark .textarea::placeholder { color: #7a7b8c; }
html.dark .checkout-gps-btn { background: #151620; border-color: #303142; color: #a99aec; }
html.dark .checkout-gps-btn:hover { border-color: #a99aec; background: #23232f; }
html.dark .checkout-gps-btn:active { background: #2e2f3f; }
html.dark .checkout-total { border-top-color: #303142; color: #ecebf4; }
html.dark .checkout-line small { color: #8f8fa3; }
html.dark .checkout-confirm p { color: #b9bac6; }

/* ---------- المفضلة ---------- */
html.dark .wishlist-remove { color: #ff8a80; }

/* ---------- طلباتي ---------- */
html.dark .my-orders h1 { color: #ecebf4; }
html.dark .my-orders-sub { color: #a1a2b3; }
html.dark .order-track-card { background: #1a1b26; border-color: #303142; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.rejected-banner { background:#fef2f2; border:1px solid #fecaca; color:#991b1b; }
.rejection-reason-inner { background:white; border:1px solid #fecaca; color:#7f1d1d; }
html.dark .rejected-banner { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.25); color:#fca5a5; }
html.dark .rejection-reason-inner { background: rgba(255,255,255,0.06); border-color: rgba(239,68,68,0.2); color:#fecaca; }
html.dark .order-track-card[style*="border-color:#fecaca"] { border-color: rgba(239,68,68,0.45) !important; }
html.dark .order-track-status[style*="background:#fef2f2"] { background: rgba(239,68,68,0.15) !important; border-color: rgba(239,68,68,0.3) !important; color:#fca5a5 !important; }
html.dark div[style*="background:#fef3c7"] { background: rgba(251,191,36,0.1) !important; border-color: rgba(251,191,36,0.2) !important; color:#fde68a !important; }
html.dark div[style*="background:#fef3c7"] b { color:#fde68a !important; }
html.dark div[style*="background:#f0fdf4"] { background: rgba(16,185,129,0.08) !important; border-color: rgba(16,185,129,0.2) !important; }
html.dark .order-track-id, html.dark .order-track-item b { color: #ecebf4; }
html.dark .order-track-date, html.dark .order-track-item small { color: #8f8fa3; }
html.dark .order-track-item { color: #b9bac6; }
html.dark .order-track-foot { border-top-color: #303142; color: #b9bac6; }
html.dark .order-track-foot b { color: #a99aec; }
html.dark .status-review { background: #3a2c14; color: #ffc46b; }
html.dark .status-shipping { background: #1b2a4a; color: #7aa2ff; }
html.dark .status-done { background: #14301f; color: #4cd787; }
html.dark .order-step:not(:last-child)::after {background: #303142; }
html.dark .order-step.done:not(:last-child)::after { background: #ff9f43; }
html.dark .order-step-dot { background: #23232f; color: #a99fc4; border-color: #3a3b4c; }
html.dark .order-step.current .order-step-dot { background: #7a5fd0; box-shadow: 0 0 0 4px rgba(122,95,208,0.25); }
html.dark .order-step.cancelled .order-step-dot { background: #3a1a1a; border-color: #4a2222; color: #ff8a80; }
html.dark .order-step.cancelled span { color: #ff8a80; }
html.dark .order-step small.oto-sub { background:#2a2340; color:#a99aec; border-color:#3a3b4c; }
html.dark .order-step span { color: #8f8fa3; }
html.dark .order-step.done span { color: #ecebf4; }
html.dark .order-step.current span { color: #a99aec; }
html.dark .order-track-items { border-top-color: #303142; }

/* ---------- البروفايل ---------- */
html.dark .profile-card { background: #1a1b26; border-color: #303142; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35); }
html.dark .profile-cover { background: radial-gradient(circle at 25% 15%, rgba(122, 95, 208, 0.45), transparent 42%), linear-gradient(120deg, #5a3f9e, #7a5fd0 60%, #3d2e63); }
html.dark .profile-avatar { border-color: #1a1b26; box-shadow: 0 0 0 1px #3a3b4c; }
html.dark .profile-name, html.dark .profile-heading, html.dark .profile-order-title,
html.dark .profile-section-title, html.dark .profile-benefits-title { color: #ecebf4; }
html.dark .profile-email, html.dark .profile-order-date, html.dark .profile-muted { color: #8f8fa3; }
html.dark .profile-benefit { border-top-color: #303142; }
html.dark .profile-benefit p { color: #b9bac6; }
html.dark .profile-tracking-foot { border-top-color: #303142; }
html.dark .profile-link { color: #a99aec; }
html.dark .profile-field label { color: #d6d2e6; }
html.dark .profile-field input:disabled { background: #23232f; color: #8f8fa3; }
html.dark .btn-ghost-profile { border-color: #3a3b4c; background: #1a1b26; color: #a99aec; }
html.dark .btn-ghost-profile:hover { background: #23232f; }
html.dark .profile-badge { background: #14301f; border-color: #1e5231; color: #4cd787; }
html.dark .profile-badge i { background: #4cd787; }

/* ---------- زر التبديل ---------- */
html.dark .theme-toggle { background: #151620; border-color: #303142; color: #ecebf4; }
html.dark .theme-toggle:hover { border-color: #a99aec; color: #a99aec; background: #23232f; }
html.dark .added-note { color: #4cd787; }
html.dark .confirm-icon { background: #14301f; }

/* ============ التوست (الإشعارات) ============ */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(94vw, 420px);
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 19px;
  flex-shrink: 0;
}

.toast-success .toast-icon { background: #e6f7ec; color: #148a3f; }
.toast-error .toast-icon { background: #ffe3e3; color: #c0392b; }
.toast-info .toast-icon { background: #f3effc; color: #7a5fd0; }

.toast-message {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: #2a2440;
  line-height: 1.5;
}

.toast-close {
  border: none;
  background: transparent;
  color: #b3a9c9;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s;
  flex-shrink: 0;
}

.toast-close:hover { color: #2a2440; background: #f1f5f9; }
.toast-close .material-icons { font-size: 18px; }

html.dark .toast-item {
  background: #1a1a2e;
  border-color: #27273a;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

html.dark .toast-message { color: #ecebf4; }
html.dark .toast-close { color: #8f8fa3; }
html.dark .toast-close:hover { color: #ecebf4; background: #27273a; }
html.dark .toast-success .toast-icon { background: #14301f; color: #4cd787; }
html.dark .toast-error .toast-icon { background: #3a1a1a; color: #ff8a80; }
html.dark .toast-info .toast-icon { background: #23232f; color: #a99aec; }

/* ============ ������� ������ ============ */
.reviews-section {
  max-width: 860px;
  margin: 34px auto 0;
  padding: 0 16px;
}
.reviews-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.reviews-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #2a2440;
  display: flex;
  align-items: center;
  gap: 8px;
}
.reviews-head h2 .material-icons { color: #ffc23d; }
.reviews-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}
.reviews-avg {
  font-size: 26px;
  font-weight: 900;
  color: #2a2440;
}
.reviews-stars { color: #ffc23d; font-size: 18px; letter-spacing: 2px; }
.reviews-count { font-size: 13px; color: #8a8499; }

.rv-form-card {
  background: #f8f6ff;
  border: 1px solid #ede8fb;
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.rv-form-head b { display: block; font-size: 15px; color: #2a2440; margin-bottom: 2px; }
.rv-form-head span { font-size: 12px; color: #8a8499; }
.rv-stars-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0;
}
.rv-star {
  border: 0;
  background: transparent;
  font-size: 32px;
  line-height: 1;
  color: #d9d4e6;
  cursor: pointer;
  padding: 0;
  transition: transform .15s ease, color .15s ease;
}
.rv-star.on { color: #ffc23d; }
.rv-star:hover { transform: scale(1.2); color: #ffc23d; }
.rv-star-label { font-size: 13px; font-weight: 800; color: #7a5fd0; margin-right: 4px; }
.rv-textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  border: 1px solid #e2dcf5;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  font-family: inherit;
  color: #2a2440;
  background: #ffffff;
  outline: none;
  transition: border-color .2s ease;
}
.rv-textarea:focus { border-color: #a78bfa; }
.rv-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.rv-btn-submit {
  border: 0;
  background: linear-gradient(135deg, #a78bfa 0%, #7a5fd0 100%);
  color: #fff;
  font-weight: 800;
  font-size: 13.5px;
  padding: 10px 22px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(122, 95, 208, 0.3);
  transition: transform .15s ease, box-shadow .15s ease;
}
.rv-btn-submit:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(122, 95, 208, 0.4); }
.rv-btn-submit:disabled { opacity: .55; cursor: not-allowed; }
.rv-btn-ghost {
  border: 1px solid #e2dcf5;
  background: #ffffff;
  color: #8a8499;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: all .2s ease;
}
.rv-btn-ghost:hover { border-color: #a78bfa; color: #7a5fd0; }

.rv-my-card {
  background: #f8f6ff;
  border: 1px solid #ede8fb;
  border-radius: 18px;
  padding: 16px 20px;
  margin-bottom: 14px;
}
.rv-my-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.rv-my-head b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  color: #2a2440;
}
.rv-my-head b .material-icons { color: #4cd787; font-size: 19px; }
.rv-my-actions { display: flex; gap: 6px; }
.rv-link-btn {
  border: 0;
  background: transparent;
  color: #7a5fd0;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background .2s ease;
}
.rv-link-btn:hover { background: rgba(122, 95, 208, 0.1); }
.rv-link-btn.danger { color: #c0392b; }
.rv-link-btn.danger:hover { background: rgba(192, 57, 43, 0.08); }
.rv-link-btn:disabled { opacity: .5; cursor: not-allowed; }
.rv-my-body .rv-stars { color: #ffc23d; font-size: 16px; letter-spacing: 2px; }
.rv-my-body p { margin: 6px 0 0; font-size: 14px; color: #4a4460; line-height: 1.7; }

.rv-cta-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  background: #f8f6ff;
  border: 1px dashed #c9bdf0;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  color: #8a8499;
}
.rv-cta-hint .material-icons { color: #a78bfa; font-size: 20px; }

.rv-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.rv-item {
  display: flex;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e9e4f7;
  border-radius: 16px;
  padding: 14px 16px;
}
.rv-item .t-avatar { flex-shrink: 0; }
.rv-item-body { flex: 1; min-width: 0; }
.rv-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rv-item-head b { font-size: 14px; color: #2a2440; }
.rv-stars--sm { color: #ffc23d; font-size: 13px; letter-spacing: 1.5px; }
.rv-comment { margin: 6px 0 0; font-size: 13.5px; color: #4a4460; line-height: 1.7; }
.rv-date { display: block; margin-top: 6px; font-size: 11.5px; color: #b3a9c9; }

.rv-empty {
  text-align: center;
  padding: 26px 16px;
  color: #8a8499;
  background: #faf9fe;
  border: 1px dashed #e2dcf5;
  border-radius: 16px;
}
.rv-empty .material-icons { font-size: 34px; color: #c9bdf0; display: block; margin-bottom: 6px; }
.rv-empty p { margin: 0; font-size: 13.5px; }

/* ����� ������ ��������� */
html.dark .reviews-head h2 { color: #ecebf4; }
html.dark .reviews-avg { color: #ecebf4; }
html.dark .reviews-count { color: #8f8fa3; }
html.dark .rv-form-card { background: #1a1b26; border-color: #303142; }
html.dark .rv-form-head b { color: #ecebf4; }
html.dark .rv-form-head span { color: #8f8fa3; }
html.dark .rv-star { color: #6f7083; }
html.dark .rv-star.on { color: #ffd25e; }
html.dark .rv-star:hover { color: #ffd25e; }
html.dark .rv-textarea { background: #151620; border-color: #303142; color: #ecebf4; }
html.dark .rv-textarea::placeholder { color: #7a7b8c; }
html.dark .rv-textarea:focus { border-color: #a78bfa; }
html.dark .rv-btn-ghost { background: #23232f; border-color: #3a3b4c; color: #a99fc4; }
html.dark .rv-btn-ghost:hover { border-color: #a78bfa; color: #c4b5fd; }
html.dark .rv-my-card { background: #1a1b26; border-color: #303142; }
html.dark .rv-my-head b { color: #ecebf4; }
html.dark .rv-my-body p { color: #b9bac6; }
html.dark .rv-cta-hint { background: #1a1b26; border-color: #3a3b4c; color: #8f8fa3; }
html.dark .rv-cta-hint .material-icons { color: #a99aec; }
html.dark .rv-item { background: #1a1b26; border-color: #303142; }
html.dark .rv-item-head b { color: #ecebf4; }
html.dark .rv-comment { color: #b9bac6; }
html.dark .rv-date { color: #6f7083; }
html.dark .rv-empty { background: #1a1b26; border-color: #303142; color: #8f8fa3; }
html.dark .rv-empty .material-icons { color: #3a3b4c; }

/* =========================================================
   إصلاحات الوضع الداكن الشاملة — الحوارات والكروت والقوائم
   يعالج مشاكل النصوص غير الظاهرة بسبب نفس لون الخلفية
   ========================================================= */

/* --- نصوص البطاقات: .title h2 كانت سوداء غير مرئية على خلفية داكنة --- */
html.dark .title h2 { color: #ecebf4; }
html.dark .cat-title { background: #23232f; color: #b9bac6; border-bottom-color: #303142; }
html.dark .price { color: #4cd787; }
html.dark .price del { color: #b9bac6; }

/* --- حوارات المفضلة: أجزاء داخلية كانت بيضاء باهتة --- */
html.dark .wishlist-dialog-img { background: #151620; border-color: #303142; }
html.dark .wishlist-dialog-empty { color: #8f8fa3; }
html.dark .wishlist-dialog-empty .material-icons { color: #6f7083; }
html.dark .wishlist-dialog-price del { color: #6f7083; }
html.dark .wishlist-action-btn.delete { background: #3a1a1a; color: #ff8a80; }
html.dark .wishlist-action-btn.delete:hover { background: #4a2222; }
html.dark .wishlist-action-btn.cart { background: #252340; color: #a99aec; }
html.dark .wishlist-action-btn.cart:hover { background: #2e2b4d; }

/* --- ديالوج كلمة المرور --- */
html.dark .pwd-close { background: #23232f; border-color: #303142; color: #a99fc4; }
html.dark .pwd-close:hover { background: #2e2f3f; border-color: #3a3b4c; color: #ecebf4; }
html.dark .pwd-input-icon { color: #a99aec; }
html.dark .pwd-input-wrap input::placeholder { color: #6f7083; }
html.dark .pwd-hint { color: #8f8fa3; }
html.dark .pwd-notice.error { background: #3a1a1a; color: #ff8a80; border-color: #4a2222; }
html.dark .pwd-notice.success { background: #14301f; color: #4cd787; border-color: #1e5231; }

/* --- Drawer hover --- */
html.dark .drawer-close-btn { color: #8f8fa3; }
html.dark .drawer-close-btn:hover { background: #27273a; color: #ecebf4; }

/* --- Auth / Policy dialogs --- */
html.dark .auth-modal-overlay { background: rgba(0,0,0,0.65); }
html.dark .policy-modal-box { background: #1c1d2a; border-color: #303142; }
html.dark .policy-modal-box .policy-modal-head { border-bottom-color: #303142; }
html.dark .policy-block { background: #23243a; border-color: #303142; }
html.dark .policy-block h3 { color: #ecebf4; }
html.dark .policy-block li { color: #b9bac6; }
html.dark .policy-list li::before { background: #a99aec; }
html.dark .auth-modal-box { background: #1e1b2e; border-color: #303142; }
html.dark .auth-modal-close { background: #23232f; color: #8f8fa3; border-color: #303142; }
html.dark .auth-modal-close:hover { background: #2e2f3f; color: #ecebf4; }

/* --- Checkout: الكروت التي كانت inline background:#fff --- */
html.dark .checkout-form { background: #1a1b26; border-color: #303142; }
html.dark .checkout-summary { background: #1a1b26; border-color: #303142; }
html.dark .input, html.dark .textarea { background: #151620; border-color: #303142; color: #ecebf4; }
html.dark .input::placeholder, html.dark .textarea::placeholder { color: #7a7b8c; }

/* كروت الشحن والدفع التي تستخدم inline styles — تجاوز قوي بـ !important */
html.dark .checkout-form > div[style*="background"] { background: #1a1b26 !important; border-color: #303142 !important; }
html.dark .checkout-payment-methods { background: #1a1b26 !important; border-color: #303142 !important; }
html.dark .checkout-section { background: #1a1b26 !important; border-color: #303142 !important; }
html.dark label[style*="background:#fff"],
html.dark label[style*="background: #fff"],
html.dark label[style*="background:#f5f3ff"],
html.dark label[style*="background: #f5f3ff"] {
  border-color: #303142 !important;
  color: #ecebf4 !important;
}
/* حالة مختارة: خلفية بنفسجية فاتحة #f5f3ff -> داكنة */
html.dark label[style*="#f5f3ff"] { background: #252340 !important; border-color: #7a5fd0 !important; }
html.dark label[style*="#dcfce7"] { background: #14301f !important; border-color: #1e5231 !important; }
html.dark label[style*="#fef3c7"] { background: #3a2c14 !important; border-color: #5a3c0a !important; }
/* صور لوجو شركات الشحن داخل الليبل */
html.dark label img[style*="background:#fff"] { background: #23232f !important; border-color: #303142 !important; }
/* رسائل داخلية بخلفية فاتحة جدا */
html.dark div[style*="background:var(--colorSuccessLight)"] { background: #14301f !important; color: #4cd787 !important; border-color: #1e5231 !important; }
html.dark div[style*="background:#f0fdf4"] { background: #14301f !important; color: #4cd787 !important; border-color: #1e5231 !important; }
html.dark div[style*="background:#fef3c7"] { background: #3a2c14 !important; color: #ffc46b !important; border-color: #5a3c0a !important; }
html.dark div[style*="background:#f8fafc"] { background: #23232f !important; color: #b9bac6 !important; border-color: #303142 !important; }
html.dark p[style*="background:var(--colorC3)"] { background: #23232f !important; color: #ecebf4 !important; }
html.dark p[style*="color:var(--colorC1)"] { color: #8f8fa3 !important; }

/* --- Product detail / Cart / Summary نصوص --- */
html.dark .cart-item { background: #1a1b26; border-color: #303142; }
html.dark .cart-item-title { color: #ecebf4; }
html.dark .cart-item-cat { color: #8f8fa3; }
html.dark .qty-control { background: #151620; border-color: #303142; }
html.dark .qty-control button { color: #ecebf4; }
html.dark .cart-item-remove { color: #8f8fa3; }
html.dark .cart-item-remove:hover { color: #ff8a80; background: #3a1a1a; }

/* --- Select / Dropdown قوائم منسدلة عامة --- */
html.dark select, html.dark .select { background: #151620; border-color: #303142; color: #ecebf4; }
html.dark select option, html.dark .select option { background: #1a1b26; color: #ecebf4; }
html.dark .products-select { background: #151620; border-color: #303142; color: #ecebf4; }
html.dark .products-select option { background: #1a1b26; color: #ecebf4; }

/* --- Checkout confirm --- */
html.dark .checkout-confirm { color: #ecebf4; }
html.dark .checkout-confirm h1 { color: #a99aec; }
html.dark .checkout-confirm p { color: #b9bac6; }

/* --- Site menu & quick links dropdown-like --- */
html.dark .site-menu ul li a { color: #ecebf4; }

/* --- Generic white cards catch-all (لضمان عدم بقاء كرت أبيض) --- */
html.dark .card-like[style*="#fff"] { background: #1a1b26 !important; color: #ecebf4 !important; }

/* --- تغطية شاملة لأي inline background أبيض متبقي (PaymentResult, MyOrders, Footer) --- */
html.dark div[style*="background: white"],
html.dark div[style*="background:white"],
html.dark div[style*="background:#fef3c7"],
html.dark div[style*="background: #fef3c7"] { border-color: #303142 !important; }
html.dark div[style*="background: white"] { background: #1a1b26 !important; color: #ecebf4 !important; }
html.dark div[style*="background:white"] { background: #1a1b26 !important; color: #ecebf4 !important; }
html.dark img[style*="background:#fff"],
html.dark img[style*="background: #fff"],
html.dark img[style*="background:#ffffff"],
html.dark img[style*="background: #ffffff"] { background: #23232f !important; border-color: #303142 !important; }
/* Footer logo: إزالة الخلفية البيضاء في الوضع الداكن */
html.dark .footer-wrapper img[style*="background"] { background: rgba(255,255,255,0.08) !important; box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important; }
html.dark a[style*="background:white"],
html.dark a[style*="background: white"] { border-color: #303142 !important; }
html.dark a[style*="background:#f3f4f6"] { background: #23232f !important; color: #ecebf4 !important; border-color: #303142 !important; }
/* تغطية إضافية للشارات والبادجات الفاتحة داخل الحوارات */
html.dark [style*="#f3f4f6"] { background: #1e293b !important; color: #e2e8f0 !important; border-color: #303142 !important; }
html.dark [style*="#e5e7eb"] { border-color: #303142 !important; }
html.dark div[style*="#f8fafc"] { background: #23232f !important; }
html.dark span[style*="#ede9fe"] { background: #2a2340 !important; color: #a99aec !important; }
html.dark [style*="#dcfce7"] { background: #14301f !important; color: #4cd787 !important; border-color: #1e5231 !important; }
html.dark [style*="#ecfdf5"] { background: #14301f !important; color: #4cd787 !important; border-color: #1e5231 !important; }
html.dark [style*="#f0fdf4"] { background: #14301f !important; color: #4cd787 !important; border-color: #1e5231 !important; }

/* Pre raw response in Orders */
html.dark pre[style*="background:white"],
html.dark pre[style*="background: white"] { background: #151620 !important; color: #ecebf4 !important; border-color: #303142 !important; }
/* OTO shipment white spans */
html.dark span[style*="background:white"],
html.dark span[style*="background: white"] { background: #23232f !important; color: #ecebf4 !important; border-color: #303142 !important; }
