/* ========================================= */
/*  LOFER  THEME - FULL    */
/* ========================================= */

:root {
  --lofer-bg: #030108; 
  --lofer-surface: rgba(16, 11, 27, 0.45);
  --lofer-surface-2: rgba(23, 16, 37, 0.65);
  --lofer-border: rgba(164, 104, 255, 0.15);
  --lofer-purple: #8b5cf6;
  --lofer-purple-2: #c084fc;
  --lofer-blue: #67e8f9;
  --lofer-text: #f8f7ff;
  --lofer-muted: #aaa4bc;
  --lofer-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  --lofer-radius: 22px;
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--lofer-bg) !important;
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(139, 92, 246, 0.12), transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(103, 232, 249, 0.08), transparent 40%),
    linear-gradient(180deg, #030108 0%, #07040f 50%, #030108 100%) !important;
  color: var(--lofer-text) !important;
}

body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: 0.25;
  background-image: linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 40px 40px; mask-image: linear-gradient(to bottom, black 10%, transparent 80%);
}

/* ========================================= */
/* شاشة التحميل (اللودنق) الأصلية الفخمة       */
/* ========================================= */
#lofer-loader {
  position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; overflow: hidden;
  background: rgba(5, 3, 10, .85); backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  opacity: 1; visibility: visible; transition: opacity .72s cubic-bezier(.22, 1, .36, 1), visibility .72s;
}
#lofer-loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
#lofer-loader::before, #lofer-loader::after {
  content: ""; position: absolute; width: 24rem; height: 24rem; border-radius: 50%; filter: blur(54px); opacity: .45;
}
#lofer-loader::before { background: #7c3aed; transform: translate(-35%, -25%); animation: lofer-loader-orb 4s ease-in-out infinite alternate; }
#lofer-loader::after { background: #2563eb; transform: translate(35%, 25%); animation: lofer-loader-orb 5s ease-in-out infinite alternate-reverse; }
@keyframes lofer-loader-orb { to { transform: translate(25%, 20%) scale(1.18); } }
.lofer-loader-box { position: relative; z-index: 1; text-align: center; }
.lofer-loader-logo { width: 82px; height: 82px; margin: 0 auto 24px; object-fit: contain; filter: drop-shadow(0 0 20px rgba(192, 132, 252, .7)); animation: lofer-logo-pulse 1.8s ease-in-out infinite; }
@keyframes lofer-logo-pulse { 50% { transform: scale(1.06); filter: drop-shadow(0 0 35px rgba(192, 132, 252, .95)); } }
.lofer-loader-mark { width: 72px; height: 72px; margin: 0 auto 22px; border: 2px solid rgba(216, 180, 254, .18); border-top-color: var(--lofer-purple-2); border-right-color: var(--lofer-blue); border-radius: 50%; animation: lofer-spin .9s linear infinite; }
@keyframes lofer-spin { to { transform: rotate(360deg); } }
.lofer-loader-title { margin: 0; color: #fff; font-size: 1.15rem; font-weight: 800; letter-spacing: .08em; }
.lofer-loader-subtitle { margin: 9px 0 0; color: #b8aecb; font-size: .78rem; }
.lofer-loader-line { width: 130px; height: 3px; overflow: hidden; margin: 18px auto 0; border-radius: 99px; background: rgba(255,255,255,.12); }
.lofer-loader-line::after { content: ""; display: block; width: 48%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lofer-purple-2), var(--lofer-blue)); animation: lofer-loading-line 1.1s ease-in-out infinite; }
@keyframes lofer-loading-line { 0% { transform: translateX(-120%); } 100% { transform: translateX(280%); } }

/* ========================================= */
/* حلول الخلفيات البيضاء (من تصميمك الأول)      */
/* ========================================= */
body .bg-white, body .bg-gray-50, body .bg-gray-100,
body [class~="bg-white"], body [class*="bg-gray-"],
body .s-search-results, body .sub-menu,
body .s-modal-body, body .s-modal-close,
body .mm-ocd__content {
  background: var(--lofer-surface) !important;
  color: var(--lofer-text) !important;
  border-color: var(--lofer-border) !important;
}
body .s-search-results { box-shadow: 0 18px 45px rgba(0,0,0,.38) !important; }
body .sub-menu { border: 1px solid var(--lofer-border) !important; border-radius: 14px !important; box-shadow: var(--lofer-shadow) !important; }
body .s-search-results a, body .sub-menu a, body .s-modal-body a { color: var(--lofer-text) !important; }
body .s-modal-body, body .s-modal-close { border-radius: 18px !important; }
body .s-modal-close { color: var(--lofer-purple-2) !important; }
body .s-modal-backdrop, body [class*="modal-backdrop"] { background: rgba(4, 2, 9, .76) !important; backdrop-filter: blur(12px); }

body [class*="empty-cart"], body [class*="emptyCart"], body .cart-empty,
body .empty-cart-icon, body .cart-empty-icon,
body [class*="empty"] .rounded-full, body [class*="empty"] [class*="icon"] {
  background: linear-gradient(145deg, rgba(37, 21, 64, 0.8), rgba(16, 10, 29, 0.8)) !important;
  color: var(--lofer-purple-2) !important;
  border-color: var(--lofer-border) !important;
  box-shadow: 0 0 35px rgba(139,92,246,.16) !important;
}
body [class*="empty"] svg { color: var(--lofer-purple-2) !important; stroke: currentColor !important; }
body [class*="empty"] h1, body [class*="empty"] h2, body [class*="empty"] h3, body [class*="empty"] p { color: var(--lofer-text) !important; }

body .s-payments-list-item { background: rgba(255,255,255,.07) !important; border: 1px solid rgba(216,180,254,.22) !important; border-radius: 10px !important; }
body [class*="text-gray-"], body [class*="text-black"], body [class*="text-slate-"] { color: var(--lofer-muted) !important; }
body [class*="border-gray-"] { border-color: var(--lofer-border) !important; }
body [class*="divide-gray-"] > * { border-color: var(--lofer-border) !important; }
body hr { border-color: var(--lofer-border) !important; }
body salla-button, body salla-modal, body salla-search, body salla-cart-summary, body salla-product-card, body custom-salla-product-card { color-scheme: dark; }

/* الهيدر والعناوين */
.top-header, header, .header, .site-header {
  background: rgba(5, 3, 12, 0.65) !important; border-bottom: 1px solid var(--lofer-border) !important;
  backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
header a, .header a, nav a { color: var(--lofer-text) !important; }
nav a:hover, header a:hover { color: var(--lofer-purple-2) !important; }
h1, h2, h3, .section-title, .lofer-category-heading h2 {
  background: linear-gradient(135deg, #fff 20%, var(--lofer-purple-2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 30px rgba(192, 132, 252, 0.15);
}

/* المنتجات */
custom-salla-product-card, .s-product-card, .product-card, .product-item {
  display: block; overflow: hidden; border: 1px solid var(--lofer-border) !important;
  border-radius: var(--lofer-radius) !important; background: var(--lofer-surface) !important;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--lofer-shadow); position: relative; transform-style: preserve-3d; will-change: transform;
}
custom-salla-product-card::before, .s-product-card::before, .product-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px;
  background: linear-gradient(135deg, var(--lofer-purple-2), var(--lofer-blue));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.4s ease; pointer-events: none;
}
custom-salla-product-card img, .s-product-card img, .product-card img { transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease; border-radius: 16px; }

/* الأزرار والأسعار */
button, .button, [class*="btn"], a[class*="button"] { border-radius: 12px !important; }
button[type="submit"], .btn-primary, .button-primary, [class*="add-to-cart"] {
  position: relative; overflow: hidden; background: linear-gradient(135deg, #7c3aed, #a855f7) !important; color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important; box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4); transition: all 0.3s ease;
}
button[type="submit"]::after, .btn-primary::after, .button-primary::after {
  content: ""; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); transform: skewX(-20deg); animation: lofer-shimmer 4s infinite;
}
@keyframes lofer-shimmer { 0% { left: -100%; } 20% { left: 200%; } 100% { left: 200%; } }
custom-salla-product-card [class*="badge"], .s-product-card [class*="badge"], .product-card [class*="badge"] { background: linear-gradient(135deg, #7c3aed, #c026d3) !important; color: #fff !important; border: 0 !important; box-shadow: 0 6px 18px rgba(168, 85, 247, 0.35); }
.price, [class*="price"], .product-price { color: var(--lofer-purple-2) !important; font-weight: 800 !important; }
input, textarea, select, .search-input { background: rgba(255, 255, 255, 0.055) !important; color: var(--lofer-text) !important; border: 1px solid var(--lofer-border) !important; border-radius: 12px !important; }

/* تأثير الدخول */
.lofer-reveal { opacity: 0; transform: translateY(30px) scale(0.97); filter: blur(5px); transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.8s ease; }
.lofer-reveal.is-visible { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }

/* ========================================= */
/* أقسام المتجر (متحركة بالسحب يمين/يسار)      */
/* ========================================= */
#lofer-category-hub {
  position: relative; max-width: 1280px; margin: 34px auto 8px; padding: 25px;
  border: 1px solid rgba(192,132,252,0.2); border-radius: 26px;
  background: linear-gradient(135deg, rgba(28,17,49,0.76), rgba(9,6,17,0.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 20px 60px rgba(0,0,0,0.22);
}
.lofer-category-heading { position: relative; z-index: 1; margin-bottom: 20px; text-align: center; }
.lofer-category-nav { display: none; position: absolute; inset: 50% 4px auto; z-index: 4; justify-content: space-between; transform: translateY(-50%); direction: ltr; pointer-events: none; }
.lofer-category-nav button { display: inline-grid; place-items: center; width: 23px; height: 23px; padding: 0 0 1px; border: 1px solid rgba(255,255,255,.34); border-radius: 50% !important; background: rgba(20,12,35,.92) !important; color: #fff !important; font-size: 1.05rem; line-height: 1; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.38); pointer-events: auto; touch-action: manipulation; }
.lofer-category-nav button:active { transform: scale(.9); background: rgba(139,92,246,.45) !important; }
.lofer-category-nav button:disabled { opacity: .28; cursor: default; pointer-events: none; box-shadow: none; }
.lofer-category-grid { 
  display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 12px;
  scroll-snap-type: x mandatory; padding-bottom: 10px; padding-top: 5px; scrollbar-width: none;
}
.lofer-category-grid::-webkit-scrollbar { display: none; }
.lofer-category-card { 
  position: relative; display: flex; flex: 0 0 240px; min-height: 85px; align-items: center; gap: 11px; 
  padding: 15px 13px; border: 1px solid rgba(192,132,252,0.2); border-radius: 17px; scroll-snap-align: center;
  background: rgba(255,255,255,0.045); color: #fff !important; text-decoration: none !important; 
  transform-style: preserve-3d; will-change: transform;
}
.lofer-category-icon { 
  display: grid; flex: 0 0 38px; place-items: center; width: 38px; height: 38px; 
  border: 1px solid rgba(216,180,254,0.28); border-radius: 12px; 
  background: linear-gradient(145deg, rgba(139,92,246,0.34), rgba(30,20,53,0.6)); 
  color: var(--lofer-purple-2); font-size: 1.1rem; box-shadow: 0 0 18px rgba(139,92,246,0.18); 
}
.lofer-category-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 5px; }
.lofer-category-copy strong { color: #fff; font-size: 0.9rem; }
.lofer-category-copy small { color: #aaa4bc; font-size: 0.68rem; }
@media (max-width: 767px) { .lofer-category-nav { display: flex; } }

/* بوب أب واتساب */
#lofer-whatsapp-widget { position: fixed; left: 22px; bottom: 22px; z-index: 99990; direction: rtl; }
#lofer-whatsapp-bubble { display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid rgba(134,239,172,0.7); border-radius: 50%; background: linear-gradient(145deg, #25d366, #128c7e); color: #fff; box-shadow: 0 12px 30px rgba(37,211,102,0.3); animation: lofer-wa-pulse 2.4s infinite; cursor: pointer; }
#lofer-whatsapp-bubble svg { width: 29px; height: 29px; fill: currentColor; }
#lofer-whatsapp-card { position: absolute; left: 0; bottom: 72px; width: min(310px, calc(100vw - 32px)); padding: 18px; border: 1px solid rgba(134,239,172,0.24); border-radius: 20px; background: linear-gradient(145deg, rgba(25,22,35,0.97), rgba(11,20,19,0.97)); opacity: 0; visibility: hidden; transform: translateY(12px) scale(0.96); transform-origin: bottom left; transition: 0.3s cubic-bezier(0.22,1,0.36,1); }
#lofer-whatsapp-card.is-open { opacity: 1; visibility: visible; transform: none; }
#lofer-whatsapp-open { display: block; width: 100%; padding: 11px; border-radius: 12px; background: linear-gradient(135deg, #25d366, #128c7e); color: #fff !important; text-align: center; font-weight: 800; text-decoration: none !important; margin-top: 15px; }
@keyframes lofer-wa-pulse { 0%, 100% { box-shadow: 0 12px 30px rgba(37,211,102,0.3), 0 0 0 6px rgba(37,211,102,0.08); } 50% { box-shadow: 0 14px 35px rgba(37,211,102,0.4), 0 0 0 12px rgba(37,211,102,0); } }

/* تحسينات الماوس (الكمبيوتر) */
@media (hover: hover) and (pointer: fine) {
  custom-salla-product-card:hover, .s-product-card:hover, .product-card:hover { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(139, 92, 246, 0.25); background: var(--lofer-surface-2) !important; }
  custom-salla-product-card:hover::before, .s-product-card:hover::before, .product-card:hover::before { opacity: 1; }
  custom-salla-product-card:hover img, .s-product-card:hover img { transform: scale(1.06); filter: saturate(1.15) brightness(1.05); }
  button[type="submit"]:hover, .btn-primary:hover, .button-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(124, 58, 237, 0.6), 0 0 15px rgba(103, 232, 249, 0.4); }
}

/* تحسينات الجوال */
@media (max-width: 767px) {
  :root { --lofer-radius: 18px; }
  #lofer-whatsapp-widget { left: 14px; bottom: 14px; }
  #lofer-category-hub { margin: 24px 12px 8px; padding: 20px 15px; border-radius: 20px; }
  .lofer-category-card { flex: 0 0 85%; } /* يأخذ أغلب مساحة الشاشة في الجوال */
}

@media (hover: none) and (pointer: coarse) {
  custom-salla-product-card, .s-product-card, .product-card, button, .button, .btn-primary, .lofer-category-card { transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.2s ease, background 0.2s ease !important; }
  custom-salla-product-card:active, .s-product-card:active, .product-card:active { transform: scale(0.96) !important; background: var(--lofer-surface-2) !important; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6), 0 0 25px rgba(139, 92, 246, 0.4) !important; border-color: rgba(192, 132, 252, 0.8) !important; }
  button[type="submit"]:active, .btn-primary:active, .button-primary:active { transform: scale(0.94) translateY(2px) !important; box-shadow: 0 2px 10px rgba(124, 58, 237, 0.5), 0 0 15px rgba(103, 232, 249, 0.4) !important; filter: brightness(1.2); }
  .lofer-category-card:active { transform: scale(0.94) !important; background: rgba(139,92,246,0.2) !important; border-color: var(--lofer-purple-2) !important; }
  custom-salla-product-card::before, .s-product-card::before, .product-card::before { display: none !important; }
}/* LOFER THEME PATCH — append after the existing theme CSS */

/* Keep the store header and its menus above banners and page content. */
.store-header,
.top-header,
header,
.header,
.site-header {
  position: relative !important;
  z-index: 1000 !important;
  isolation: isolate;
  overflow: visible !important;
}

custom-main-menu,
#mobile-menu,
.main-menu,
.root-level,
.root-level.has-children {
  position: relative;
  z-index: 1010 !important;
  overflow: visible !important;
}

.store-header .sub-menu,
header .sub-menu,
.header .sub-menu,
.site-header .sub-menu,
custom-main-menu .sub-menu {
  position: absolute !important;
  z-index: 1100 !important;
  visibility: visible;
  pointer-events: auto;
  background: linear-gradient(145deg, rgba(20, 13, 34, .98), rgba(8, 6, 16, .98)) !important;
  border: 1px solid rgba(192, 132, 252, .28) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .72) !important;
}

/* The fixed banner must remain below the header/dropdown layer. */
.s-block--fixed-banner,
.banner--fixed,
.s-block--fixed-banner .container,
.banner--fixed img {
  position: relative;
  z-index: 1 !important;
}

/* Salla login, search, offer, cart, and checkout dialogs. */
salla-login-modal,
salla-modal.s-login-modal,
salla-modal.salla-modal,
.salla-modal,
.s-modal-container {
  color-scheme: dark !important;
  z-index: 120000 !important;
}

.s-login-modal .s-modal-overlay,
.salla-modal .s-modal-overlay,
.s-modal-overlay {
  background: rgba(3, 1, 8, .78) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.s-login-modal .s-modal-body,
.s-login-modal .s-modal-wrapper,
.s-login-modal .s-modal-content,
.s-login-modal [class*="body"],
.s-login-modal [class*="content"],
.salla-login-modal .s-modal-body,
salla-login-modal [class*="body"],
salla-login-modal [class*="content"] {
  background: linear-gradient(145deg, rgba(22, 14, 38, .98), rgba(7, 5, 14, .98)) !important;
  color: var(--lofer-text) !important;
  border-color: var(--lofer-border) !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .72) !important;
}

.s-login-modal h1,
.s-login-modal h2,
.s-login-modal h3,
.s-login-modal p,
.s-login-modal label,
salla-login-modal h1,
salla-login-modal h2,
salla-login-modal h3,
salla-login-modal p,
salla-login-modal label {
  color: var(--lofer-text) !important;
}

.s-login-modal input,
salla-login-modal input,
.s-login-modal textarea,
salla-login-modal textarea {
  background: rgba(255, 255, 255, .07) !important;
  color: #fff !important;
  caret-color: var(--lofer-purple-2) !important;
  border: 1px solid rgba(192, 132, 252, .3) !important;
}

.s-login-modal input::placeholder,
salla-login-modal input::placeholder {
  color: rgba(248, 247, 255, .55) !important;
}

.s-login-modal button,
salla-login-modal button {
  color: #fff !important;
}

/* Avoid accidental white surfaces in Salla checkout/auth components. */
.s-login-modal [class*="bg-white"],
.salla-login-modal [class*="bg-white"],
.s-modal-body [class*="bg-white"] {
  background: rgba(16, 11, 27, .92) !important;
  color: var(--lofer-text) !important;
}

@media (max-width: 767px) {
  .store-header,
  header,
  .header,
  .site-header {
    z-index: 2000 !important;
  }

  .store-header .sub-menu,
  header .sub-menu,
  .header .sub-menu,
  .site-header .sub-menu {
    z-index: 2100 !important;
    max-width: calc(100vw - 24px);
  }
}

/* LOFER ACCOUNT / ORDERS PATCH — append after the existing theme CSS */

:root {
  --color-primary: #8b5cf6 !important;
  --color-primary-dark: #7c3aed !important;
  --color-primary-reverse: #ffffff !important;
  --color-main: #8b5cf6 !important;
  --color-main-reverse: #ffffff !important;
  --ts-color-text: #f8f7ff !important;
  --ts-color-text-reverse: #f8f7ff !important;
}

/* Account menu opened from the person icon. */
.s-user-menu-dropdown,
.s-user-menu-dropdown-header,
.s-user-menu-dropdown-list,
.s-user-menu-dropdown-item,
.s-user-menu-dropdown-item-link,
.s-user-menu-inline,
#store-header-user-menu,
#store-sidebar-user-menu {
  background: linear-gradient(145deg, rgba(22, 14, 38, .98), rgba(7, 5, 14, .98)) !important;
  color: #f8f7ff !important;
  border-color: rgba(164,104,255,.22) !important;
  box-shadow: 0 22px 65px rgba(0,0,0,.65) !important;
}

.s-user-menu-dropdown-item-title,
.s-user-menu-dropdown-item-prefix,
.s-user-menu-trigger-name,
.s-user-menu-trigger-hello,
.s-user-menu-dropdown a,
.s-user-menu-dropdown button {
  color: #f8f7ff !important;
}

.s-user-menu-dropdown-item:hover,
.s-user-menu-dropdown-item-link:hover {
  background: rgba(139,92,246,.18) !important;
  color: #fff !important;
}

/* Orders page surfaces, sidebar, banner, table and mobile rows. */
.s-orders-wrapper,
.s-orders-list-wrapper,
.s-orders-table,
.s-orders-table-head,
.s-orders-table-tbody,
.s-orders-table-tbody-tr,
.s-orders-table-tbody-tr-td,
.s-orders-table-tbody-tr-td-content,
.s-orders-filters,
.s-orders-banner,
.profile-header,
.sidebar,
.sidebar.bg-white,
[class~="lg:bg-white"] {
  background: linear-gradient(145deg, rgba(16, 11, 27, .94), rgba(7, 5, 14, .94)) !important;
  color: #f8f7ff !important;
  border-color: rgba(164,104,255,.18) !important;
}

.s-orders-table-tbody-tr-shadow,
.s-orders-table-tbody-tr-shadow.animated {
  box-shadow: 0 12px 35px rgba(0,0,0,.34) !important;
}

.s-orders-wrapper *,
.s-orders-list-wrapper *,
.s-orders-table *,
.s-orders-filters *,
.profile-header *,
.sidebar * {
  color: inherit;
}

.s-orders-reference-id,
.s-orders-mobile-title,
.s-orders-status-container,
.s-orders-banner-text,
.s-orders-table-head-tr-th,
.s-orders-table-tbody-tr-td-content,
.s-orders-wrapper a,
.s-orders-wrapper p,
.s-orders-wrapper h1,
.s-orders-wrapper h2,
.s-orders-wrapper h3,
.sidebar a,
.sidebar span {
  color: #f8f7ff !important;
}

.s-orders-banner-icon,
.s-orders-status-container,
.s-orders-copy-to-clipboard-button {
  background: rgba(139,92,246,.18) !important;
  color: #c084fc !important;
  border-color: rgba(192,132,252,.3) !important;
}

.s-orders-review-star-icon { color: #fbbf24 !important; }

.s-orders-wrapper .s-button-outline,
.s-orders-wrapper .s-button-primary-outline,
.s-orders-wrapper button,
.s-orders-wrapper .btn-outline,
.sidebar .btn-outline {
  background: rgba(255,255,255,.06) !important;
  color: #f8f7ff !important;
  border-color: rgba(192,132,252,.3) !important;
}

.s-orders-wrapper .s-button-primary,
.s-orders-wrapper .btn-primary,
.sidebar .btn-primary {
  background: linear-gradient(135deg,#7c3aed,#a855f7) !important;
  color: #fff !important;
  border-color: transparent !important;
}

@media (max-width: 767px) {
  .s-user-menu-dropdown,
  #store-header-user-menu,
  #store-sidebar-user-menu { z-index: 2200 !important; }
  .s-orders-table-tbody-tr { border-radius: 16px !important; overflow: hidden; }
}
/* LOFER PRODUCT-PAGE FIX — append after all existing CSS */

:root {
  --lofer-control-bg: rgba(22, 14, 38, .94);
  --lofer-control-bg-hover: rgba(139, 92, 246, .26);
  --lofer-control-border: rgba(192, 132, 252, .42);
}

/* Account/avatar control: remove the white circular surface. */
.s-user-menu-trigger,
.s-user-menu-trigger-avatar,
.s-user-menu-trigger-slot,
.s-user-menu-avatar-wrap,
.s-user-menu-trigger-icon {
  background: var(--lofer-control-bg) !important;
  color: #f8f7ff !important;
  border: 1px solid var(--lofer-control-border) !important;
  box-shadow: 0 0 20px rgba(139, 92, 246, .18) !important;
}

.s-user-menu-trigger-avatar img,
.s-user-menu-avatar-wrap img {
  background: linear-gradient(145deg, #241544, #0b0715) !important;
  border-radius: inherit !important;
}

/* Product gallery arrows and all icon-only controls. */
.s-slider-button-icon,
.s-slider-next,
.s-slider-prev,
.s-slider-nav-arrow,
button[aria-label*="Previous"],
button[aria-label*="Next"],
[aria-label*="Previous slide"],
[aria-label*="Next slide"],
.s-product-card-wishlist-btn,
#store-product-wishlist-btn,
.s-social-share-btn,
.s-quantity-input-button {
  background: var(--lofer-control-bg) !important;
  color: #f8f7ff !important;
  border: 1px solid var(--lofer-control-border) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.34) !important;
}

.s-slider-button-icon:hover,
.s-slider-next:hover,
.s-slider-prev:hover,
.s-product-card-wishlist-btn:hover,
#store-product-wishlist-btn:hover,
.s-social-share-btn:hover,
.s-quantity-input-button:hover {
  background: var(--lofer-control-bg-hover) !important;
  color: #fff !important;
  border-color: #c084fc !important;
}

.s-product-card-wishlist-btn.s-product-card-wishlist-added,
#store-product-wishlist-btn.s-product-card-wishlist-added,
.s-product-card-wishlist-btn.added,
#store-product-wishlist-btn.added {
  background: linear-gradient(135deg, #7c3aed, #c026d3) !important;
  color: #fff !important;
  border-color: #c084fc !important;
}

/* Bottom quick-order/purchase strip shown as a white box. */
.sticky-product-bar,
.sticky-product-bar.bg-white,
.s-quick-order-container,
.s-quick-order-container.s-quick-order-white,
#store-product-quick-order,
#store-product-offer,
#store-product-offer > *,
#store-product-quick-order > * {
  background: linear-gradient(145deg, rgba(22, 14, 38, .98), rgba(7, 5, 14, .98)) !important;
  color: #f8f7ff !important;
  border-color: rgba(164,104,255,.24) !important;
  box-shadow: 0 18px 55px rgba(0,0,0,.46) !important;
}

.sticky-product-bar *,
.s-quick-order-container *,
#store-product-quick-order *,
#store-product-offer * { color: inherit; }

.sticky-product-bar button,
.s-quick-order-container button,
#store-product-quick-order button,
#store-product-offer button {
  color: #fff !important;
}

/* Salla's product toast and mini-checkout must use the same surface. */
#store-add-product-toast,
.s-add-product-toast,
.salla-mini-checkout-modal,
.s-mini-checkout-modal,
.s-mini-checkout-modal-container,
.salla-modal.s-mini-checkout-modal {
  color: #f8f7ff !important;
  color-scheme: dark !important;
}

#store-add-product-toast [class*="toast"],
#store-add-product-toast > *,
.s-add-product-toast > *,
.s-mini-checkout-modal .s-modal-body,
.salla-mini-checkout-modal .s-modal-body,
.s-mini-checkout-modal-container .s-modal-body {
  background: linear-gradient(145deg, rgba(22, 14, 38, .98), rgba(7, 5, 14, .98)) !important;
  color: #f8f7ff !important;
  border: 1px solid rgba(192,132,252,.3) !important;
  box-shadow: 0 18px 60px rgba(0,0,0,.62) !important;
}

#store-add-product-toast button,
#store-add-product-toast a,
.s-add-product-toast button,
.s-add-product-toast a {
  color: #fff !important;
  background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
  border-color: transparent !important;
}

/* Prevent default white utility classes from leaking into this product page. */
#product-589282733 .bg-white,
#product-589282733 [class~="bg-white"],
#product-589282733 .text-black,
#product-589282733 [class*="text-gray-"] {
  background-color: var(--lofer-control-bg) !important;
  color: #f8f7ff !important;
}

@media (max-width: 767px) {
  .s-slider-button-icon,
  .s-slider-next,
  .s-slider-prev { min-width: 38px !important; min-height: 38px !important; }
  .sticky-product-bar { border-radius: 18px 18px 0 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  .lofer-wishlist-toast { animation: none !important; }
}

/* Custom notification inserted by the wishlist handler. */
.lofer-wishlist-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 130000;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  direction: rtl;
  color: #fff;
  background: linear-gradient(135deg, rgba(37, 20, 64, .98), rgba(10, 7, 18, .98));
  border: 1px solid rgba(192,132,252,.48);
  border-radius: 16px;
  box-shadow: 0 18px 55px rgba(0,0,0,.6), 0 0 24px rgba(139,92,246,.2);
  opacity: 0;
  transform: translateY(14px) scale(.97);
  transition: opacity .28s ease, transform .28s ease;
}
.lofer-wishlist-toast.is-visible { opacity: 1; transform: none; }
.lofer-wishlist-toast__icon {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #c026d3);
  color: #fff;
  font-size: 17px;
}
.lofer-wishlist-toast__copy { display: flex; flex-direction: column; gap: 3px; }
.lofer-wishlist-toast__title { font-weight: 800; font-size: .9rem; }
.lofer-wishlist-toast__text { color: #c7b9da; font-size: .74rem; }
.lofer-wishlist-toast__close { margin-inline-start: auto; padding: 3px 7px; color: #c084fc; background: transparent; border: 0; cursor: pointer; }
@media (max-width: 767px) { .lofer-wishlist-toast { right: 14px; bottom: 14px; left: 14px; max-width: none; } }
/* LOFER STOCK SYNC — safe visual fallback for stale homepage cards */
.lofer-stock-available {
  border-color: rgba(134,239,172,.45) !important;
}
.lofer-availability-link {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid rgba(192,132,252,.35) !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg,#7c3aed,#a855f7) !important;
  color: #fff !important;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: 0 8px 22px rgba(124,58,237,.28);
}
.lofer-availability-link:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}
/* LOFER CART DARK FIX
   أضف هذا الكود بعد جميع أكواد CSS الحالية في الثيم. */

:root {
  --lofer-cart-bg: #030108;
  --lofer-cart-surface: linear-gradient(145deg, rgba(22, 14, 38, .96), rgba(7, 5, 14, .96));
  --lofer-cart-surface-soft: rgba(255, 255, 255, .055);
  --lofer-cart-border: rgba(164, 104, 255, .22);
  --lofer-cart-text: #f8f7ff;
  --lofer-cart-muted: #b8aecb;
}

/* Page and all explicit white utility surfaces. */
body:has(.cart-item),
body:has(#store-cart-summary),
body:has([data-testid^="store-cart-"]) {
  background: var(--lofer-cart-bg) !important;
  color: var(--lofer-cart-text) !important;
}

.cart-item,
.cart-item.bg-white,
#free-shipping,
#cart-gifting,
#store-cart-summary,
#store-cart-summary-card,
.s-cart-summary,
.s-cart-summary-card,
.s-cart-summary-card-inner,
.cart-options,
[data-testid^="store-cart-"] .bg-white,
[class~="bg-white"] {
  background: var(--lofer-cart-surface) !important;
  color: var(--lofer-cart-text) !important;
  border-color: var(--lofer-cart-border) !important;
  box-shadow: 0 18px 55px rgba(0,0,0,.38) !important;
}

/* Text that is hidden by the original dark-on-light utility colors. */
.cart-item h1,
.cart-item h2,
.cart-item h3,
.cart-item p,
.cart-item span,
.cart-item a,
.cart-item label,
.cart-options label,
.cart-options b,
.cart-options small,
#free-shipping h4,
#free-shipping p,
#cart-gifting,
#store-cart-summary,
#store-cart-summary * {
  color: var(--lofer-cart-text) !important;
}

.cart-item .text-gray-900,
.cart-item .text-gray-800,
.cart-item .text-gray-700,
.cart-item .text-gray-600,
.cart-item .text-gray-500,
.cart-item .text-gray-400,
.cart-options .text-gray-500,
#free-shipping .text-gray-500 {
  color: var(--lofer-cart-muted) !important;
}

.cart-item .item-price,
.cart-item .item-total,
.cart-item [data-testid="store-cart-item-price"],
.cart-item [data-testid="store-cart-item-total"] {
  color: #c084fc !important;
  font-weight: 800 !important;
}

.cart-item img {
  border-color: var(--lofer-cart-border) !important;
  background: rgba(255,255,255,.06) !important;
}

/* Quantity control. */
.s-quantity-input-container,
.s-quantity-input-input,
.s-quantity-input-button,
.s-quantity-input-increase-button,
.s-quantity-input-decrease-button {
  background: var(--lofer-cart-surface-soft) !important;
  color: #fff !important;
  border-color: var(--lofer-cart-border) !important;
}

.s-quantity-input-container {
  border: 1px solid var(--lofer-cart-border) !important;
  border-radius: 12px !important;
  overflow: hidden;
}

.s-quantity-input-input { border-inline: 1px solid var(--lofer-cart-border) !important; }
.s-quantity-input-button:hover { background: rgba(139,92,246,.22) !important; color: #fff !important; }

/* Product options rendered below the cart item. */
.s-product-options-wrapper,
.s-product-options-option-container,
.s-product-options-option,
.s-product-options-option-content,
.s-form-control,
.s-product-options select,
.s-product-options input {
  color: var(--lofer-cart-text) !important;
  background: var(--lofer-cart-surface-soft) !important;
  border-color: var(--lofer-cart-border) !important;
}

.s-product-options select,
.s-product-options input,
.s-form-control {
  min-height: 42px;
  border: 1px solid var(--lofer-cart-border) !important;
  border-radius: 10px !important;
}

.s-product-options option { background: #100b1b !important; color: #fff !important; }

/* Delete button and cart actions. */
.btn--delete,
.btn--delete button,
.s-button-danger {
  color: #fecaca !important;
  background: rgba(127,29,29,.45) !important;
  border-color: rgba(248,113,113,.35) !important;
}

.cart-item button,
#store-cart-summary button,
#store-cart-summary a,
.s-cart-summary button,
.s-cart-summary a {
  border-radius: 12px !important;
}

/* Shipping progress and hidden/visible panels. */
#free-shipping-bar {
  background: rgba(255,255,255,.09) !important;
}
#free-shipping-bar .progress-bg { background: linear-gradient(90deg,#7c3aed,#c084fc) !important; }

/* Salla modals and checkout surfaces that may be opened from the cart. */
salla-modal .s-modal-body,
salla-mini-checkout-modal .s-modal-body,
.s-modal-body,
.s-modal-wrapper {
  background: var(--lofer-cart-surface) !important;
  color: var(--lofer-cart-text) !important;
  border-color: var(--lofer-cart-border) !important;
}

.s-modal-overlay { background: rgba(3,1,8,.78) !important; backdrop-filter: blur(12px); }

@media (max-width: 767px) {
  .cart-item,
  #free-shipping,
  #cart-gifting,
  #store-cart-summary,
  .cart-options { border-radius: 16px !important; }
  .cart-item .border-t,
  .cart-item .border-b { border-color: var(--lofer-cart-border) !important; }
}
/* LOFER UI UPGRADE — أضف هذا الجزء بعد CSS الثيم الحالي */

/* 1) الإجمالي: لون قوي وواضح على الخلفية الداكنة */
#store-cart-summary,
#store-cart-summary *,
salla-cart-summary,
salla-cart-summary * {
  color: #f8f7ff !important;
}

#store-cart-summary [class*="total"],
#store-cart-summary [data-testid*="total"],
#store-cart-summary [class*="amount"],
#store-cart-summary [class*="price"],
salla-cart-summary [class*="total"],
salla-cart-summary [data-testid*="total"],
salla-cart-summary [class*="amount"],
salla-cart-summary [class*="price"] {
  color: #ffffff !important;
  font-weight: 900 !important;
  text-shadow: 0 0 18px rgba(192,132,252,.36);
}

#store-cart-summary .text-primary,
#store-cart-summary [class*="text-primary"],
salla-cart-summary .text-primary,
salla-cart-summary [class*="text-primary"] {
  color: #d8b4fe !important;
}

/* 2) زر الثلاث شخطات في الجوال: لا تتركه أبيض */
#mobile-menu,
#mobile-menu button,
#mobile-menu .sicon-menu,
.mobile-menu,
.mobile-menu button,
.menu-toggle,
.hamburger,
.hamburger button,
[class*="menu-toggler"],
[class*="menu-toggle"],
[class*="mobile-menu"] button {
  color: #f8f7ff !important;
  background: rgba(18,10,32,.92) !important;
  border-color: rgba(192,132,252,.32) !important;
}

[class*="menu-toggler"] svg,
[class*="menu-toggle"] svg,
[class*="mobile-menu"] svg,
.hamburger svg,
.hamburger i,
.sicon-menu {
  color: #d8b4fe !important;
  fill: currentColor !important;
  stroke: currentColor !important;
}

/* 3) مربع «تسوق حسب القسم»: حركة هادئة، واضحة، بلا تشتيت */
#lofer-category-hub {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 30px auto 18px !important;
  padding: 22px !important;
  border: 1px solid rgba(192,132,252,.22) !important;
  border-radius: 24px !important;
  background: linear-gradient(135deg, rgba(27,16,48,.82), rgba(8,5,16,.9)) !important;
  box-shadow: 0 20px 55px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.05) !important;
}

#lofer-category-hub::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -90px;
  right: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(139,92,246,.16);
  filter: blur(35px);
  animation: lofer-category-orb 10s ease-in-out infinite alternate;
}

#lofer-category-hub::after {
  content: "";
  position: absolute;
  z-index: -1;
  bottom: -100px;
  left: 18%;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(103,232,249,.08);
  filter: blur(40px);
  animation: lofer-category-orb 13s ease-in-out infinite alternate-reverse;
}

@keyframes lofer-category-orb {
  from { transform: translate3d(0,0,0) scale(.9); opacity: .6; }
  to { transform: translate3d(-24px,18px,0) scale(1.12); opacity: 1; }
}

.lofer-category-heading { margin-bottom: 15px !important; }
.lofer-category-heading h2 {
  margin: 0 !important;
  font-size: clamp(1.05rem, 2vw, 1.35rem) !important;
  letter-spacing: -.02em;
}

.lofer-category-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px !important;
  overflow: visible !important;
  padding: 4px !important;
}

.lofer-category-card {
  min-width: 0 !important;
  min-height: 78px !important;
  flex: initial !important;
  gap: 10px !important;
  padding: 12px !important;
  border: 1px solid rgba(192,132,252,.17) !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.045) !important;
  transition: transform .35s ease, border-color .35s ease, background .35s ease, box-shadow .35s ease !important;
}

.lofer-category-card:hover,
.lofer-category-card:focus-visible {
  transform: translateY(-4px) !important;
  border-color: rgba(192,132,252,.58) !important;
  background: rgba(139,92,246,.14) !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.25), 0 0 20px rgba(139,92,246,.12) !important;
}

.lofer-category-icon {
  flex-basis: 36px !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 11px !important;
}

.lofer-category-copy strong { font-size: .84rem !important; }
.lofer-category-copy small { font-size: .66rem !important; }

@media (max-width: 900px) {
  .lofer-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  #lofer-category-hub { margin: 22px 10px 14px !important; padding: 16px 12px !important; }
  .lofer-category-grid { display: flex !important; overflow-x: auto !important; scroll-snap-type: x mandatory; gap: 9px !important; padding-bottom: 8px !important; scrollbar-width: none; }
  .lofer-category-grid::-webkit-scrollbar { display: none; }
  .lofer-category-card { flex: 0 0 76% !important; scroll-snap-align: start; }
}

@media (prefers-reduced-motion: reduce) {
  #lofer-category-hub::before,
  #lofer-category-hub::after { animation: none !important; }
  .lofer-category-card { transition: none !important; }
}
/* LOFER WISHLIST + SPIN WHEEL PATCH — أضف بعد CSS الثيم الحالي */

/* وضوح زر القلب في بطاقات المنتجات وصفحة المنتج */
.s-product-card-wishlist-btn,
#store-product-wishlist-btn,
.btn--wishlist,
[data-testid*="wishlist"],
.salla-wishlist-actions,
.salla-wishlist-actions button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border: 1px solid rgba(216,180,254,.58) !important;
  border-radius: 14px !important;
  background: linear-gradient(145deg, rgba(43,24,73,.98), rgba(12,7,23,.98)) !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.4), 0 0 18px rgba(139,92,246,.18) !important;
  cursor: pointer;
  transition: transform .25s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease !important;
}

.s-product-card-wishlist-btn::after,
#store-product-wishlist-btn::after,
.btn--wishlist::after {
  content: 'مفضلة';
  position: absolute;
  top: calc(100% + 7px);
  right: 50%;
  z-index: 5;
  padding: 4px 7px;
  border-radius: 6px;
  background: #171022;
  color: #e9d5ff;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(50%) translateY(-3px);
  transition: opacity .2s ease, transform .2s ease;
}

.s-product-card-wishlist-btn:hover,
#store-product-wishlist-btn:hover,
.btn--wishlist:hover,
.salla-wishlist-actions button:hover {
  transform: translateY(-2px) scale(1.04) !important;
  border-color: #e9d5ff !important;
  background: linear-gradient(135deg, #7c3aed, #c026d3) !important;
  box-shadow: 0 10px 28px rgba(124,58,237,.38) !important;
}

.s-product-card-wishlist-btn:hover::after,
#store-product-wishlist-btn:hover::after,
.btn--wishlist:hover::after { opacity: 1; transform: translateX(50%) translateY(0); }

.s-product-card-wishlist-btn.s-product-card-wishlist-added,
.s-product-card-wishlist-btn.added,
#store-product-wishlist-btn.s-product-card-wishlist-added,
#store-product-wishlist-btn.added,
.btn--wishlist.added,
.btn--wishlist.active {
  background: linear-gradient(135deg, #db2777, #7c3aed) !important;
  border-color: #f0abfc !important;
  color: #fff !important;
}

.s-product-card-wishlist-btn i,
#store-product-wishlist-btn i,
.btn--wishlist i,
.salla-wishlist-actions svg { color: currentColor !important; fill: currentColor !important; }

/* Toast المفضلة */
.lofer-wishlist-toast { z-index: 140000 !important; }

/* زر فتح عجلة الحظ */
.lofer-spin-launcher {
  position: fixed;
  left: 22px;
  bottom: 92px;
  z-index: 99980;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid rgba(216,180,254,.55);
  border-radius: 999px;
  background: linear-gradient(135deg,#7c3aed,#c026d3);
  color: #fff;
  font-size: .78rem;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(124,58,237,.35);
  cursor: pointer;
  animation: lofer-spin-launcher-pulse 3s ease-in-out infinite;
}
.lofer-spin-launcher:hover { transform: translateY(-2px); }
@keyframes lofer-spin-launcher-pulse { 50% { box-shadow: 0 14px 36px rgba(192,38,211,.48), 0 0 0 7px rgba(192,38,211,.08); } }

/* نافذة العجلة */
.lofer-spin-overlay {
  position: fixed;
  inset: 0;
  z-index: 140000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3,1,8,.78);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.lofer-spin-overlay.is-open { opacity: 1; visibility: visible; }
.lofer-spin-modal {
  position: relative;
  width: min(430px, 100%);
  padding: 24px 20px 20px;
  direction: rtl;
  text-align: center;
  border: 1px solid rgba(216,180,254,.28);
  border-radius: 26px;
  background: linear-gradient(145deg,#1b1030,#080510);
  color: #fff;
  box-shadow: 0 24px 80px rgba(0,0,0,.65), 0 0 35px rgba(139,92,246,.18);
}
.lofer-spin-close { position: absolute; top: 10px; left: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.lofer-spin-title { margin: 0; color: #fff; font-size: 1.25rem; font-weight: 900; }
.lofer-spin-subtitle { margin: 8px 0 16px; color: #c7b9da; font-size: .78rem; }
.lofer-wheel-wrap { position: relative; width: min(270px, 78vw); aspect-ratio: 1; margin: 4px auto 16px; }
.lofer-wheel { width: 100%; height: 100%; border: 7px solid #e9d5ff; border-radius: 50%; background: conic-gradient(#7c3aed 0deg 45deg,#c026d3 45deg 90deg,#2563eb 90deg 135deg,#7c3aed 135deg 180deg,#c026d3 180deg 225deg,#2563eb 225deg 270deg,#7c3aed 270deg 315deg,#c026d3 315deg 360deg); box-shadow: 0 0 0 7px rgba(192,132,252,.12), 0 16px 40px rgba(0,0,0,.48); transition: transform 4.8s cubic-bezier(.12,.72,.16,1); }
.lofer-wheel-labels { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: center; justify-items: center; pointer-events: none; color: #fff; font-size: .7rem; font-weight: 900; text-shadow: 0 2px 5px rgba(0,0,0,.6); }
.lofer-wheel-labels span { max-width: 80px; }
.lofer-wheel-pointer { position: absolute; top: -11px; left: 50%; z-index: 2; width: 0; height: 0; border-right: 13px solid transparent; border-left: 13px solid transparent; border-top: 26px solid #fef08a; transform: translateX(-50%); filter: drop-shadow(0 3px 5px rgba(0,0,0,.6)); }
.lofer-spin-button { width: 100%; min-height: 46px; border: 0; border-radius: 13px; background: linear-gradient(135deg,#7c3aed,#c026d3); color: #fff; font-weight: 900; cursor: pointer; }
.lofer-spin-button:disabled { opacity: .55; cursor: not-allowed; }
.lofer-spin-result { min-height: 22px; margin-top: 12px; color: #f0abfc; font-weight: 800; font-size: .9rem; }
.lofer-spin-note { margin: 10px 0 0; color: #9386a7; font-size: .68rem; }
@media (max-width: 520px) { .lofer-spin-launcher { left: 14px; bottom: 82px; } .lofer-spin-modal { padding: 22px 14px 16px; } }
@media (prefers-reduced-motion: reduce) { .lofer-spin-launcher { animation: none; } .lofer-wheel { transition-duration: .01ms; } }
/* LOFER WHEEL FIX — النصوص أصبحت داخل القرص وتدور معه */
.lofer-wheel-wrap { position: relative !important; }
.lofer-wheel {
  position: relative !important;
  overflow: hidden !important;
  display: block !important;
  background: conic-gradient(from -22.5deg,
    #7c3aed 0deg 45deg,
    #c026d3 45deg 90deg,
    #2563eb 90deg 135deg,
    #7c3aed 135deg 180deg,
    #c026d3 180deg 225deg,
    #2563eb 225deg 270deg,
    #7c3aed 270deg 315deg,
    #c026d3 315deg 360deg) !important;
  transition: transform 5.2s cubic-bezier(.12,.72,.16,1) !important;
}
.lofer-wheel::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 54px;
  height: 54px;
  border: 5px solid rgba(255,255,255,.92);
  border-radius: 50%;
  background: radial-gradient(circle, #24113e 0 45%, #a855f7 46% 100%);
  transform: translate(-50%,-50%);
  box-shadow: 0 0 18px rgba(0,0,0,.5);
  z-index: 4;
}
.lofer-wheel-labels {
  position: absolute !important;
  inset: 0 !important;
  z-index: 3 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
}
.lofer-wheel-labels span {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  display: block !important;
  width: 72px !important;
  max-width: 72px !important;
  margin: 0 !important;
  color: #fff !important;
  font-size: .64rem !important;
  line-height: 1.15 !important;
  font-weight: 900 !important;
  text-align: center !important;
  text-shadow: 0 2px 5px rgba(0,0,0,.72) !important;
  transform: translate(-50%,-50%) rotate(var(--lofer-angle)) translateY(-91px) rotate(calc(var(--lofer-angle) * -1)) !important;
}
.lofer-wheel-labels span:nth-child(1) { --lofer-angle: 0deg; }
.lofer-wheel-labels span:nth-child(2) { --lofer-angle: 45deg; }
.lofer-wheel-labels span:nth-child(3) { --lofer-angle: 90deg; }
.lofer-wheel-labels span:nth-child(4) { --lofer-angle: 135deg; }
.lofer-wheel-labels span:nth-child(5) { --lofer-angle: 180deg; }
.lofer-wheel-labels span:nth-child(6) { --lofer-angle: 225deg; }
.lofer-wheel-labels span:nth-child(7) { --lofer-angle: 270deg; }
.lofer-wheel-labels span:nth-child(8) { --lofer-angle: 315deg; }
.lofer-spin-button { position: relative; z-index: 2; }
@media (max-width: 520px) {
  .lofer-wheel-labels span { width: 62px !important; max-width: 62px !important; font-size: .56rem !important; }
  .lofer-wheel-labels span { transform: translate(-50%,-50%) rotate(var(--lofer-angle)) translateY(-76px) rotate(calc(var(--lofer-angle) * -1)) !important; }
  .lofer-wheel::after { width: 46px; height: 46px; }
}
/* LOFER SPIN RESTORE — الاحتفال، الكود، والموقت فقط */
.lofer-spin-modal.is-win { border-color: rgba(250,204,21,.64) !important; box-shadow: 0 24px 90px rgba(0,0,0,.7), 0 0 50px rgba(250,204,21,.2) !important; }
.lofer-spin-modal.is-win::before,
.lofer-spin-modal.is-win::after { content: "✦"; position: absolute; color: #fde68a; font-size: 2rem; animation: lofer-win-sparkle 1.2s ease-in-out infinite alternate; }
.lofer-spin-modal.is-win::before { top: 26%; right: 5%; }
.lofer-spin-modal.is-win::after { bottom: 22%; left: 6%; animation-delay: .35s; }
@keyframes lofer-win-sparkle { from { transform: scale(.7) rotate(0); opacity: .45; } to { transform: scale(1.25) rotate(25deg); opacity: 1; } }
.lofer-prize-code { display: inline-flex; align-items: center; margin-top: 8px; padding: 7px 12px; border: 1px dashed rgba(250,204,21,.6); border-radius: 9px; background: rgba(250,204,21,.1); color: #fde68a; font-family: ui-monospace, monospace; font-weight: 900; letter-spacing: .08em; direction: ltr; }
.lofer-spin-timer { margin: 8px auto 0; color: #c7b9da; font-size: .72rem; font-weight: 700; }
.lofer-spin-confetti { position: fixed; inset: 0; z-index: 140001; pointer-events: none; overflow: hidden; }
.lofer-spin-confetti i { position: absolute; top: -18px; width: 8px; height: 16px; background: var(--c); animation: lofer-confetti-fall 2.8s linear forwards; transform: rotate(var(--r)); }
@keyframes lofer-confetti-fall { to { top: 110%; transform: translateX(var(--x)) rotate(720deg); opacity: .1; } }
@media (prefers-reduced-motion: reduce) { .lofer-spin-modal.is-win::before, .lofer-spin-modal.is-win::after, .lofer-spin-confetti i { animation: none !important; } }

/* LOFER ACTUAL FINAL FIX */
salla-button.btn--wishlist,
salla-button.s-product-card-wishlist-btn,
salla-button[data-testid="store-product-wishlist-btn"]{display:inline-flex!important;align-items:center!important;justify-content:center!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;line-height:1!important}
salla-button.btn--wishlist>button,
salla-button.s-product-card-wishlist-btn>button,
salla-button[data-testid="store-product-wishlist-btn"]>button{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;margin:0!important;padding:0!important;border:1px solid rgba(192,132,252,.48)!important;border-radius:13px!important;background:rgba(22,14,38,.9)!important;color:#fff!important;cursor:pointer!important;opacity:1!important;visibility:visible!important}
salla-button.btn--wishlist>button,
salla-button.s-product-card-wishlist-btn>button,
salla-button[data-testid="store-product-wishlist-btn"]>button{font-size:0!important;color:#e9d5ff!important;background:rgba(22,14,38,.9)!important}
salla-button.btn--wishlist>button::before,
salla-button.s-product-card-wishlist-btn>button::before,
salla-button[data-testid="store-product-wishlist-btn"]>button::before{content:'♡';font-size:26px!important;line-height:1!important;font-family:Arial,sans-serif!important;color:#e9d5ff!important}
salla-button.btn--wishlist.s-product-card-wishlist-added>button::before,
salla-button.s-product-card-wishlist-btn.s-product-card-wishlist-added>button::before,
salla-button[data-testid="store-product-wishlist-btn"].s-product-card-wishlist-added>button::before,
salla-button.btn--wishlist.added>button::before,
salla-button.btn--wishlist.active>button::before{content:'♥';color:#f472b6!important}
.details-slider salla-button.btn--wishlist{display:none!important}
.s-product-options-option-container.lofer-store-option-hidden{display:none!important}
.s-product-options-option-container.hidden{display:none!important}
salla-product-options{display:block!important;direction:rtl!important;text-align:right!important}
.s-product-options-option-container{margin:12px 0!important;padding:13px!important;border:1px solid rgba(164,104,255,.22)!important;border-radius:15px!important;background:linear-gradient(145deg,rgba(22,14,38,.78),rgba(7,5,14,.78))!important;color:#f8f7ff!important;box-shadow:0 8px 22px rgba(0,0,0,.2)!important}
.s-product-options-option-label{display:block!important;margin:0 0 9px!important;color:#f8f7ff!important;font-size:.85rem!important;font-weight:800!important;line-height:1.4!important;text-align:right!important}
.s-product-options-digital-card-wrapper{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
.s-product-options-digital-card-option{display:flex!important;align-items:center!important;justify-content:center!important;min-height:44px!important;padding:8px!important;border:1px solid rgba(192,132,252,.32)!important;border-radius:11px!important;background:rgba(255,255,255,.045)!important;color:#d8b4fe!important;font-size:.72rem!important;line-height:1.25!important;text-align:center!important;cursor:pointer!important}
.s-product-options-digital-card-option:has(input:checked){border-color:#c084fc!important;background:linear-gradient(135deg,rgba(124,58,237,.88),rgba(168,85,247,.7))!important;color:#fff!important}
.s-product-options-digital-card-option span{color:inherit!important;text-align:center!important}
.s-product-options-digital-card-out-of-stock:empty{display:none!important}

/* LOFER REDEEM POINTS — added without changing wheel styles */
.lofer-spin-account { margin: 10px 0 0; color: #c7b9da; font-size: .75rem; font-weight: 700; }
.lofer-redeem-box { margin-top: 16px; padding: 14px; border: 1px solid rgba(192,132,252,.24); border-radius: 15px; background: rgba(255,255,255,.045); text-align: center; }
.lofer-redeem-box h3 { margin: 0 0 5px; color: #fff; font-size: .95rem; }
.lofer-redeem-box p { margin: 0 0 10px; color: #aaa4bc; font-size: .72rem; }
.lofer-redeem-button { width: 100%; min-height: 40px; border: 0; border-radius: 11px; background: linear-gradient(135deg,#2563eb,#7c3aed); color: #fff; font-weight: 800; cursor: pointer; }
.lofer-redeem-button:disabled { opacity: .55; cursor: not-allowed; }
.lofer-redeem-result { min-height: 20px; margin-top: 9px; color: #f0abfc; font-size: .78rem; font-weight: 800; }

/* LOFER REWARDS CATALOG — added without changing existing wheel styles */
.lofer-rewards-open { position: absolute; top: 12px; left: 12px; z-index: 8; padding: 8px 11px; border: 1px solid rgba(192,132,252,.42); border-radius: 10px; background: rgba(124,58,237,.25); color: #fff; font-size: .7rem; font-weight: 800; cursor: pointer; }
.lofer-rewards-open:hover { background: rgba(124,58,237,.5); }
.lofer-rewards-panel { position: absolute; inset: 12px; z-index: 10; display: none; padding: 18px 14px; border: 1px solid rgba(216,180,254,.3); border-radius: 20px; background: linear-gradient(145deg,#1b1030,#080510); overflow: auto; }
.lofer-rewards-panel.is-open { display: block; }
.lofer-rewards-head { display: flex; align-items: center; justify-content: space-between; color: #fff; font-size: 1rem; }
.lofer-rewards-close { width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 1.2rem; cursor: pointer; }
.lofer-rewards-help { margin: 8px 0; color: #aaa4bc; font-size: .75rem; }
.lofer-rewards-points { margin: 10px 0; color: #f0abfc; font-size: .82rem; font-weight: 900; }
.lofer-rewards-list { display: grid; gap: 9px; }
.lofer-reward-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px; border: 1px solid rgba(192,132,252,.22); border-radius: 13px; background: rgba(255,255,255,.05); text-align: right; }
.lofer-reward-card strong, .lofer-reward-card small { display: block; }
.lofer-reward-card strong { color: #fff; font-size: .8rem; }
.lofer-reward-card small { margin-top: 3px; color: #aaa4bc; font-size: .65rem; }
.lofer-reward-card button { flex: 0 0 auto; padding: 8px 9px; border: 0; border-radius: 9px; background: linear-gradient(135deg,#2563eb,#7c3aed); color: #fff; font-size: .65rem; font-weight: 800; cursor: pointer; }
.lofer-reward-card button:disabled { opacity: .6; cursor: not-allowed; }
.lofer-reward-card button.is-redeemed { background: #15803d; }
.lofer-rewards-loading, .lofer-rewards-error { padding: 18px 5px; color: #c7b9da; font-size: .75rem; text-align: center; }
@media (max-width: 520px) { .lofer-rewards-open { top: 9px; left: 9px; } .lofer-rewards-panel { inset: 8px; } }

/* LOFER DOPAMINE ACCOUNT UI — wheel only */
.lofer-spin-close { left: auto !important; right: 12px !important; z-index: 20 !important; display: grid !important; place-items: center !important; width: 36px !important; height: 36px !important; background: linear-gradient(145deg,rgba(255,255,255,.16),rgba(255,255,255,.05)) !important; border: 1px solid rgba(255,255,255,.18) !important; color: #fff !important; font-size: 1.35rem !important; line-height: 1 !important; box-shadow: 0 6px 18px rgba(0,0,0,.3) !important; }
.lofer-spin-close:hover { background: linear-gradient(145deg,#7c3aed,#c026d3) !important; transform: rotate(90deg) scale(1.05); }
.lofer-account-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; margin: 14px 0 4px; direction: rtl; }
.lofer-stat-card { position: relative; min-height: 76px; overflow: hidden; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 11px 12px; border-radius: 18px; text-align: right; border: 1px solid rgba(216,180,254,.25); background: linear-gradient(145deg,rgba(255,255,255,.10),rgba(255,255,255,.035)); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 25px rgba(0,0,0,.22); }
.lofer-stat-card::after { content: ''; position: absolute; width: 90px; height: 90px; top: -45px; left: -25px; border-radius: 50%; background: rgba(192,132,252,.17); filter: blur(3px); pointer-events: none; }
.lofer-coins-card { border-color: rgba(250,204,21,.34); background: linear-gradient(145deg,rgba(120,80,10,.38),rgba(37,21,64,.54)); }
.lofer-coins-card::after { background: rgba(250,204,21,.22); }
.lofer-streak-card { border-color: rgba(244,114,182,.30); background: linear-gradient(145deg,rgba(120,30,70,.30),rgba(37,21,64,.54)); }
.lofer-stat-icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 11px; background: rgba(255,255,255,.10); color: #fde68a; font-size: 1.15rem; box-shadow: 0 0 18px rgba(250,204,21,.2); }
.lofer-streak-card .lofer-stat-icon { color: #fb7185; }
.lofer-stat-card small { color: #d8cce6; font-size: .62rem; font-weight: 700; }
.lofer-stat-card strong { color: #fff; font-size: 1.18rem; line-height: 1.1; letter-spacing: .02em; text-shadow: 0 0 16px rgba(255,255,255,.25); }
.lofer-stat-card em { grid-column: 2; color: #f5d0fe; font-size: .58rem; font-style: normal; white-space: nowrap; }
.lofer-streak-card.is-hot { animation: lofer-streak-pulse 1.4s ease-in-out 2; }
.lofer-account-pop { animation: lofer-account-pop .65s cubic-bezier(.22,1,.36,1); }
@keyframes lofer-streak-pulse { 50% { transform: translateY(-3px) scale(1.025); box-shadow: 0 0 25px rgba(244,114,182,.3), 0 12px 30px rgba(0,0,0,.25); } }
@keyframes lofer-account-pop { 0% { transform: scale(.96); opacity: .5; } 55% { transform: scale(1.025); } 100% { transform: scale(1); opacity: 1; } }
@media (max-width: 390px) { .lofer-stat-card { padding: 9px 8px; } .lofer-stat-card strong { font-size: 1rem; } .lofer-stat-card em { font-size: .52rem; } }

.lofer-reward-card.is-claimed { opacity: .55; border-color: rgba(148,163,184,.22); }
.lofer-reward-card button.is-redeemed, .lofer-reward-card.is-claimed button { background: #475569 !important; color: #cbd5e1 !important; cursor: not-allowed !important; }

.lofer-spin-modal.is-win { animation: lofer-win-glow .8s cubic-bezier(.22,1,.36,1); }
.lofer-spin-modal.is-win .lofer-spin-result { animation: lofer-prize-reveal .75s cubic-bezier(.22,1,.36,1); color: #fde68a !important; text-shadow: 0 0 18px rgba(250,204,21,.65); }
.lofer-spin-modal.lofer-win-burst::after { content: '✦  مبروك  ✦'; position: absolute; left: 50%; top: 7%; transform: translateX(-50%); z-index: 6; width: max-content; color: #fde68a; font-size: .8rem; font-weight: 900; letter-spacing: .14em; animation: lofer-win-banner 2.2s ease forwards; pointer-events: none; }
@keyframes lofer-win-glow { 0% { transform: scale(.96); filter: brightness(1); } 45% { transform: scale(1.025); filter: brightness(1.3); } 100% { transform: scale(1); filter: brightness(1); } }
@keyframes lofer-prize-reveal { 0% { opacity: 0; transform: translateY(12px) scale(.8); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes lofer-win-banner { 0% { opacity: 0; transform: translate(-50%,-10px) scale(.7); } 20%,75% { opacity: 1; transform: translate(-50%,0) scale(1); } 100% { opacity: 0; transform: translate(-50%,-5px) scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .lofer-spin-modal.is-win,.lofer-spin-modal.is-win .lofer-spin-result,.lofer-spin-modal.lofer-win-burst::after { animation: none !important; } }

.lofer-redeem-feedback { display: grid; gap: 4px; min-height: 0; margin: 10px 0; padding: 0; border-radius: 15px; text-align: center; overflow: hidden; transition: opacity .25s, transform .25s; }
.lofer-redeem-feedback:empty { display: none; }
.lofer-redeem-feedback.is-loading { padding: 11px; color: #d8b4fe; background: rgba(124,58,237,.12); border: 1px solid rgba(192,132,252,.22); }
.lofer-redeem-feedback.is-success, .lofer-redeem-feedback.is-error { padding: 13px 12px; animation: lofer-feedback-in .45s cubic-bezier(.22,1,.36,1); }
.lofer-redeem-feedback.is-success { border: 1px solid rgba(134,239,172,.42); background: radial-gradient(circle at 50% -80%,rgba(250,204,21,.32),transparent 65%),linear-gradient(145deg,rgba(22,101,52,.35),rgba(9,35,28,.7)); box-shadow: 0 0 25px rgba(134,239,172,.12), inset 0 1px 0 rgba(255,255,255,.1); color: #bbf7d0; }
.lofer-redeem-feedback.is-error { border: 1px solid rgba(251,113,133,.4); background: rgba(127,29,29,.22); color: #fecdd3; }
.lofer-feedback-icon { display: grid; place-items: center; width: 28px; height: 28px; margin: 0 auto 3px; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 1.05rem; font-weight: 900; }
.lofer-redeem-feedback strong { color: #fff; font-size: .82rem; }
.lofer-redeem-feedback small { color: inherit; font-size: .68rem; line-height: 1.55; }
@keyframes lofer-feedback-in { from { opacity: 0; transform: translateY(-8px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Hide the old duplicate countdown; the main status message remains visible. */
.lofer-spin-timer { display: none !important; }