/* ==========================================================
   PSQ STORE — ثيم داكن على Raed، مقيس من متجر Pixel Zone
   نسخة نظيفة: كل قاعدة مرة واحدة، بلا تعارض.
   ========================================================== */

:root {
  --color-primary: #22D3EE;
  --color-primary-dark: #00ADC8;
  --color-primary-light: #48F9FF;
  --color-primary-reverse: #00546F;

  --psq-bg: #172235;         /* خلفية الصفحة */
  --psq-deep: #0E1726;       /* خلفية ثانوية / التذييل */
  --psq-header: #161D2C;     /* الهيدر والقوائم */
  --psq-panel: #1E2C42;      /* النوافذ والبطاقات الفاتحة */
  --psq-black: #000000;      /* الحقول وصندوق الشراء */
  --psq-line: rgba(255, 255, 255, 0.10);
  --psq-line-2: rgba(255, 255, 255, 0.16);
  --psq-cyan: #22D3EE;
  --psq-white: #FFFFFF;
  --psq-text: #EDEDED;
  --psq-muted: #9CA3AF;
  --psq-danger: #EF4444;

  --psq-btn-bg: #FFFFFF;     /* زر الإضافة للسلة */
  --psq-btn-fg: #0B1220;

  --psq-img-radius: 14px;    /* دوران صور المنتجات */
  --psq-poster-max: 420px;   /* أقصى عرض للبوستر */
  --psq-thumb: 56px;         /* مقاس المصغّرة */
  --psq-field-h: 40px;       /* ارتفاع الحقول */
  --psq-btn-h: 42px;         /* ارتفاع الأزرار */
  --psq-gap: 64px;           /* تباعد الأقسام */
  --psq-cols-m: 2;           /* أعمدة المنتجات: جوال */
  --psq-cols-t: 3;           /* تابلت */
  --psq-cols-d: 4;           /* ديسكتوب */
}

/* ══════════ 1 · الأساس ══════════ */

html,
body.theme-raed,
body.theme-raed #app,
body.theme-raed #main-content {
  background-color: var(--psq-bg) !important;
  color: var(--psq-white) !important;
}

body.theme-raed .s-block,
body.theme-raed .s-block--full-bg,
body.theme-raed .s-block--tabs-produtcs,
body.theme-raed .bg-gray-50,
body.theme-raed .bg-gray-100,
body.theme-raed .bg-slate-50,
body.theme-raed .bg-slate-100,
body.theme-raed section.bg-white {
  background-color: var(--psq-bg) !important;
}

body.theme-raed #main-content .bg-white {
  background-color: var(--psq-panel) !important;
  color: var(--psq-text) !important;
}

body.theme-raed #main-content > .s-block,
body.theme-raed #main-content > section {
  margin-top: var(--psq-gap) !important;
}

body.theme-raed #main-content .container {
  max-width: 95% !important;
}

/* نصوص Tailwind الداكنة على خلفية داكنة */
body.theme-raed .text-gray-800,
body.theme-raed .text-gray-900,
body.theme-raed .text-slate-800,
body.theme-raed .text-slate-900,
body.theme-raed .text-black {
  color: var(--psq-text) !important;
}

body.theme-raed .text-gray-600,
body.theme-raed .text-gray-700 {
  color: var(--psq-muted) !important;
}

body.theme-raed .text-red-700,
body.theme-raed .text-red-800,
body.theme-raed .\!text-red-800,
body.theme-raed .text-red-900 {
  color: #FCA5A5 !important;
}

body.theme-raed ::selection {
  background-color: var(--psq-cyan) !important;
  color: var(--psq-deep) !important;
}

/* شريط التمرير — الصفحة تُمرَّر من html لا من body */
html::-webkit-scrollbar { width: 10px; }
html::-webkit-scrollbar-track { background: var(--psq-deep); }
html::-webkit-scrollbar-thumb { background: #263246; border-radius: 10px; }
html::-webkit-scrollbar-thumb:hover { background: var(--psq-cyan); }
html { scrollbar-color: #263246 var(--psq-deep); }

/* ══════════ 2 · الهيدر ══════════ */

body.theme-raed .store-header,
body.theme-raed #mainnav,
body.theme-raed #mainnav .inner,
body.theme-raed .main-nav-container,
body.theme-raed .top-navbar {
  background-color: var(--psq-header) !important;
  color: var(--psq-white) !important;
  border: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

body.theme-raed #mainnav { min-height: 89px !important; }

body.theme-raed .store-header .container {
  max-width: 95% !important;
  padding: 0 10px !important;
  position: relative !important;
}

body.theme-raed #mainnav a,
body.theme-raed #mainnav button,
body.theme-raed #mainnav i,
body.theme-raed .store-header a,
body.theme-raed .store-header button,
body.theme-raed .store-header i {
  color: var(--psq-white) !important;
}

body.theme-raed #mainnav a:hover,
body.theme-raed .store-header a:hover {
  color: var(--psq-cyan) !important;
}

/* الشعار في المنتصف */
body.theme-raed #mainnav .logo,
body.theme-raed #mainnav .navbar-brand,
body.theme-raed #mainnav [class*="logo"],
body.theme-raed #mainnav a:has(> img) {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  z-index: 3 !important;
}

body.theme-raed .store-header img {
  max-height: 64px !important;
  width: auto !important;
}

/* الأيقونات مسطّحة — الدائرة تأتي من .header-btn__icon في الثيم */
body.theme-raed .header-btn__icon,
body.theme-raed .s-cart-summary-wrapper,
body.theme-raed #mainnav .header-btn,
body.theme-raed #mainnav .search-btn,
body.theme-raed #mainnav .mburger {
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  color: var(--psq-white) !important;
}

body.theme-raed .header-btn__icon { font-size: 24px !important; }

body.theme-raed #mainnav .search-btn,
body.theme-raed #mainnav .mburger { font-size: 26px !important; }

body.theme-raed .s-cart-summary-wrapper {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
}

body.theme-raed .s-cart-summary-wrapper:hover .header-btn__icon,
body.theme-raed #mainnav .search-btn:hover {
  color: var(--psq-cyan) !important;
}

body.theme-raed .s-cart-summary-count {
  position: absolute !important;
  top: -6px !important;
  inset-inline-end: -8px !important;
  inset-inline-start: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 16px !important;
  height: 16px !important;
  padding: 0 3px !important;
  background-color: var(--psq-danger) !important;
  color: var(--psq-white) !important;
  border: 2px solid var(--psq-header) !important;
  border-radius: 999px !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  z-index: 2 !important;
}

body.theme-raed .s-cart-summary-content { display: none !important; }

/* زر تسجيل الدخول */
body.theme-raed .s-user-menu-login-btn,
body.theme-raed .header-signInBtn,
body.theme-raed .store-header a[href*="/login"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: auto !important;
  min-width: 0 !important;
  height: 40px !important;
  padding: 0 14px !important;
  background-color: #0F1622 !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: var(--psq-white) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

/* salla-user-menu[avatar-only] يرسم أيقونة بلا نص. النص يُضاف
   هنا فقط في تلك الحالة، فلا يتكرر لو أُطفئ الخيار من لوحة سلة.
   ::before يسبق الأيقونة، وباتجاه RTL يقع النص يمينها. */
body.theme-raed salla-user-menu[avatar-only] .s-user-menu-login-btn::before {
  content: "تسجيل الدخول";
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: var(--psq-white);
  white-space: nowrap;
}

body.theme-raed .s-user-menu-login-btn:hover,
body.theme-raed .header-signInBtn:hover,
body.theme-raed .store-header a[href*="/login"]:hover {
  background-color: #16202F !important;
  opacity: 1 !important;
}

body.theme-raed .s-user-menu-login-btn svg {
  fill: currentColor !important;
  width: 18px !important;
  height: 18px !important;
}

body.theme-raed .store-header .flex.items-center.justify-end { gap: 14px !important; }

/* البحث — salla-search يبني حقله بالـJS */
body.theme-raed .header-search,
body.theme-raed salla-search,
body.theme-raed .s-search-modal,
body.theme-raed .s-search-container,
body.theme-raed .s-search-input-wrapper {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.theme-raed .s-search-input,
body.theme-raed input[type="search"] {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--psq-line) !important;
  border-radius: 999px !important;
  color: var(--psq-white) !important;
}

body.theme-raed .s-search-input::placeholder,
body.theme-raed input[type="search"]::placeholder { color: var(--psq-muted) !important; }

body.theme-raed .search-result,
body.theme-raed .search-results {
  background-color: var(--psq-panel) !important;
  color: var(--psq-white) !important;
  border-color: var(--psq-line) !important;
}

/* قائمة الجوال */
body.theme-raed .main-menu,
body.theme-raed .mobile-menu,
body.theme-raed .sidebar-menu {
  background-color: var(--psq-header) !important;
  color: var(--psq-white) !important;
}

body.theme-raed .main-menu a:hover,
body.theme-raed .mobile-menu a:hover { color: var(--psq-cyan) !important; }

/* ══════════ 3 · عناوين الأقسام والتبويبات ══════════ */

body.theme-raed .s-block__title,
body.theme-raed .s-block__title h2,
body.theme-raed .s-block__title h3,
body.theme-raed .section-title,
body.theme-raed .section-main-title,
body.theme-raed main h1,
body.theme-raed main h2,
body.theme-raed main h3 {
  color: var(--psq-white) !important;
}

body.theme-raed .s-block__title p,
body.theme-raed .section-title p { color: var(--psq-muted) !important; }

body.theme-raed .s-block__title h2,
body.theme-raed .section-main-title {
  position: relative !important;
  padding-bottom: 10px !important;
}

body.theme-raed .s-block__title h2::after,
body.theme-raed .section-main-title::after {
  content: "" !important;
  position: absolute !important;
  bottom: 0 !important;
  right: 0 !important;
  width: 56px !important;
  height: 3px !important;
  border-radius: 3px !important;
  background-color: var(--psq-cyan) !important;
}

/* لون النص على الهوست أيضاً: قبل تهيئة المكوّن يقع النص
   على salla-button نفسه بلون رمادي داكن غير مقروء. */
body.theme-raed .tab-trigger { color: var(--psq-text) !important; }

body.theme-raed .tab-trigger .s-button-element {
  min-height: 42px !important;
  padding: 10px 24px !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  transition: 0.2s ease !important;
}

body.theme-raed .tab-trigger:not(.is-active) .s-button-element {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--psq-line) !important;
  color: var(--psq-text) !important;
}

body.theme-raed .tab-trigger.is-active .s-button-element {
  background-color: var(--psq-cyan) !important;
  border-color: var(--psq-cyan) !important;
  color: var(--psq-deep) !important;
  box-shadow: 0 5px 18px rgba(34, 211, 238, 0.25) !important;
}

/* ══════════ 4 · شبكة المنتجات والبطاقات ══════════ */

body.theme-raed .s-products-list-wrapper,
body.theme-raed salla-products-list > div {
  display: grid !important;
  grid-template-columns: repeat(var(--psq-cols-m), minmax(0, 1fr)) !important;
  gap: 12px !important;
}

@media (min-width: 768px) {
  body.theme-raed .s-products-list-wrapper,
  body.theme-raed salla-products-list > div {
    grid-template-columns: repeat(var(--psq-cols-t), minmax(0, 1fr)) !important;
    gap: 18px !important;
  }
}

@media (min-width: 1024px) {
  body.theme-raed .s-products-list-wrapper,
  body.theme-raed salla-products-list > div {
    grid-template-columns: repeat(var(--psq-cols-d), minmax(0, 1fr)) !important;
    gap: 22px !important;
  }
}

/* السلايدرات تبقى flex — تأتي بعد الشبكة لتغلبها */
body.theme-raed .swiper-wrapper,
body.theme-raed .swiper .s-products-list-wrapper,
body.theme-raed .s-slider-wrapper .s-products-list-wrapper,
body.theme-raed salla-products-slider .s-products-list-wrapper,
body.theme-raed salla-products-slider > div,
body.theme-raed salla-slider > div {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 0 !important;
}

body.theme-raed .swiper-slide { flex-shrink: 0 !important; }

/* البطاقة: بلا إطار ولا خلفية */
body.theme-raed custom-salla-product-card.s-product-card-entry,
body.theme-raed custom-salla-product-card.s-product-card-entry:hover {
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  overflow: visible !important;
  color: var(--psq-text) !important;
}

/* الصورة 1:1 — flex:0 0 auto ضرورية لأن Raed يعطيها flex:1 1 0% */
body.theme-raed .s-product-card-image {
  flex: 0 0 auto !important;
  aspect-ratio: 1 / 1 !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: var(--psq-img-radius) !important;
  overflow: hidden !important;
}

body.theme-raed .s-product-card-image a,
body.theme-raed .s-product-card-image figure {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

body.theme-raed .s-product-card-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  transition: transform 0.35s ease !important;
}

body.theme-raed custom-salla-product-card:hover .s-product-card-image img {
  transform: scale(1.06) !important;
}

body.theme-raed .s-product-card-content,
body.theme-raed .s-product-card-content-main,
body.theme-raed .s-product-card-content-sub,
body.theme-raed .s-product-card-content-footer {
  color: var(--psq-text) !important;
  text-align: center !important;
  padding-bottom: 0 !important;
}

body.theme-raed .s-product-card-content,
body.theme-raed .s-product-card-content-main { padding-top: 10px !important; }

body.theme-raed .s-product-card-content-title,
body.theme-raed .s-product-card-content-title a {
  color: var(--psq-white) !important;
  font-weight: 700 !important;
}

body.theme-raed .s-product-card-content-title {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  margin-bottom: 4px !important;
}

body.theme-raed .s-product-card-content-title a:hover { color: var(--psq-cyan) !important; }
body.theme-raed .s-product-card-content-subtitle { color: var(--psq-muted) !important; }

/* الأسعار */
body.theme-raed .s-product-card-price {
  color: var(--psq-white) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

body.theme-raed .s-product-card-sale-price {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  color: var(--psq-white) !important;
}

body.theme-raed .s-product-card-sale-price > h4,
body.theme-raed .s-product-card-sale-price > h4 + i {
  color: var(--psq-danger) !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

body.theme-raed .s-product-card-sale-price > span,
body.theme-raed .s-product-card-sale-price > span + i {
  color: var(--psq-white) !important;
  font-size: 11px !important;
  opacity: 0.75 !important;
}

body.theme-raed .s-product-card-sale-price > span { text-decoration: line-through !important; }

body.theme-raed .s-product-card-rating {
  color: var(--psq-muted) !important;
  justify-content: center !important;
}

body.theme-raed .s-product-card-rating i { color: #FBBF24 !important; }

/* زر الإضافة — أبيض مصمت، الأيقونة يسار النص */
body.theme-raed custom-salla-product-card salla-button:not(.s-product-card-wishlist-btn) .s-button-element {
  background-color: var(--psq-btn-bg) !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: var(--psq-btn-fg) !important;
  font-weight: 700 !important;
  width: 100% !important;
  min-height: 44px !important;
  box-shadow: none !important;
  flex-direction: row-reverse !important;
  gap: 8px !important;
}

body.theme-raed custom-salla-product-card salla-button:not(.s-product-card-wishlist-btn) .s-button-element:hover {
  background-color: var(--psq-cyan) !important;
}

body.theme-raed custom-salla-product-card .s-button-element i { color: inherit !important; }

body.theme-raed .s-product-card-wishlist-btn .s-button-element {
  background-color: rgba(0, 0, 0, 0.55) !important;
  border: 1px solid var(--psq-line) !important;
  color: var(--psq-white) !important;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

body.theme-raed .s-product-card-wishlist-btn .s-button-element:hover { color: var(--psq-danger) !important; }

body.theme-raed .s-product-card-promotion-title {
  background-color: rgba(34, 211, 238, 0.14) !important;
  color: var(--psq-cyan) !important;
  border: 1px solid rgba(34, 211, 238, 0.35) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 3px 9px !important;
  border-radius: 8px !important;
  max-width: 62% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* البنرات والسلايدر */
body.theme-raed .s-block--banners img,
body.theme-raed .s-block--one-wide-banner img,
body.theme-raed .banner-entry img {
  border-radius: 0 !important;
  object-fit: contain !important;
  width: 100% !important;
  height: auto !important;
}

body.theme-raed .s-slider-nav-arrow {
  background-color: var(--psq-panel) !important;
  border: 1px solid var(--psq-line) !important;
  color: var(--psq-white) !important;
}

body.theme-raed .s-slider-nav-arrow:hover {
  background-color: var(--psq-cyan) !important;
  color: var(--psq-deep) !important;
}

body.theme-raed .swiper-pagination-bullet { background-color: var(--psq-muted) !important; }
body.theme-raed .swiper-pagination-bullet-active { background-color: var(--psq-cyan) !important; }

/* ══════════ 5 · صفحة المنتج ══════════ */

body.theme-raed .container--product-details { background-color: transparent !important; }

body.theme-raed .product-single h1,
body.theme-raed .container--product-details h1 {
  color: var(--psq-white) !important;
  font-size: 19px !important;
  line-height: 1.4 !important;
}

body.theme-raed .product-entry__sub-title {
  color: var(--psq-white) !important;
  font-size: 13px !important;
}

/* المعرض — swiper يحتاج overflow:hidden وإلا تتسرّب الصورة */
body.theme-raed .details-slider {
  max-width: var(--psq-poster-max) !important;
  margin-right: auto !important;
  margin-left: auto !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.theme-raed .details-slider .swiper,
body.theme-raed .details-slider .swiper-slide,
body.theme-raed .details-slider .magnify-wrapper {
  background-color: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body.theme-raed .details-slider img {
  border-radius: var(--psq-img-radius) !important;
  background-color: transparent !important;
  border: 0 !important;
  max-width: 100% !important;
}

body.theme-raed .details-slider [class*="thumbs"] .swiper-slide {
  width: var(--psq-thumb) !important;
  height: var(--psq-thumb) !important;
  flex: 0 0 var(--psq-thumb) !important;
  opacity: 0.5 !important;
  overflow: hidden !important;
  transition: opacity 0.2s ease !important;
}

body.theme-raed .details-slider [class*="thumbs"] .swiper-slide img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
  border: 2px solid transparent !important;
}

body.theme-raed .details-slider .swiper-slide-thumb-active { opacity: 1 !important; }
body.theme-raed .details-slider .swiper-slide-thumb-active img { border-color: var(--psq-cyan) !important; }

/* القلب والمشاركة */
body.theme-raed salla-wishlist-actions .s-button-element,
body.theme-raed salla-social-share .s-button-element {
  background-color: var(--psq-black) !important;
  color: var(--psq-white) !important;
  border: 1px solid var(--psq-line-2) !important;
  border-radius: 50% !important;
  width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.theme-raed salla-wishlist-actions .s-button-element i,
body.theme-raed salla-social-share .s-button-element i {
  color: inherit !important;
  font-size: 14px !important;
}

body.theme-raed salla-wishlist-actions .s-button-element:hover,
body.theme-raed salla-social-share .s-button-element:hover {
  border-color: var(--psq-cyan) !important;
  color: var(--psq-cyan) !important;
}

/* شارة «تم شراءه … مرة» — شريط بعرض كامل */
body.theme-raed .product-single .rounded-md.inline-flex,
body.theme-raed .container--product-details .inline-flex.rounded-md {
  display: flex !important;
  width: 100% !important;
  align-items: center !important;
  background-color: var(--psq-black) !important;
  border: 1px solid var(--psq-line) !important;
  border-radius: 10px !important;
  padding: 8px 0 !important;
  margin-bottom: 10px !important;
}

body.theme-raed .product-single .rounded-md.inline-flex > div,
body.theme-raed .container--product-details .inline-flex.rounded-md > div {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: var(--psq-white) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

body.theme-raed .product-single .rounded-md.inline-flex i,
body.theme-raed .product-single .rounded-md.inline-flex span {
  color: var(--psq-white) !important;
  margin: 0 !important;
}

/* الوصف */
body.theme-raed .product__description,
body.theme-raed .product__description p,
body.theme-raed .product__description li,
body.theme-raed .product__description span {
  color: var(--psq-text) !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
}

body.theme-raed .product__description h1,
body.theme-raed .product__description h2,
body.theme-raed .product__description h3,
body.theme-raed .product__description strong {
  color: var(--psq-white) !important;
}

body.theme-raed .product__description a {
  color: var(--psq-cyan) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  word-break: break-word !important;
}

/* السعر */
body.theme-raed .price-wrapper,
body.theme-raed .total-price,
body.theme-raed .starting-or-normal-price {
  color: var(--psq-white) !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  background-color: transparent !important;
}

body.theme-raed .price_is_on_sale .total-price { color: var(--psq-danger) !important; }

body.theme-raed .before-price {
  color: var(--psq-muted) !important;
  text-decoration: line-through !important;
}

/* صندوق الشراء أسود — يُستخدم #main-content لتجاوز قاعدة الثيم ذات المعرّف */
body.theme-raed #main-content .product-form,
body.theme-raed #main-content .product-form > section,
body.theme-raed #main-content .product-form > div,
body.theme-raed #main-content .product-form .s-form-group,
body.theme-raed #main-content .sticky-product-bar {
  background-color: var(--psq-black) !important;
  border-color: var(--psq-line) !important;
  color: var(--psq-text) !important;
}

body.theme-raed #main-content .product-form {
  border: 1px solid var(--psq-line) !important;
  border-radius: 10px !important;
  padding: 12px !important;
}

body.theme-raed #main-content .sticky-product-bar {
  border-top: 1px solid var(--psq-line) !important;
  border-radius: 12px 12px 0 0 !important;
}

body.theme-raed #main-content .product-form label,
body.theme-raed #main-content salla-product-options label,
body.theme-raed #main-content .product-form .s-form-label {
  color: var(--psq-text) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
}

body.theme-raed #main-content .product-form .s-form-label-required,
body.theme-raed #main-content .product-form .text-red-500 { color: var(--psq-danger) !important; }

body.theme-raed #main-content .product-form input,
body.theme-raed #main-content .product-form select,
body.theme-raed #main-content .product-form textarea,
body.theme-raed #main-content .product-form .s-form-control,
body.theme-raed #main-content salla-product-options input,
body.theme-raed #main-content salla-product-options select,
body.theme-raed #main-content salla-product-options textarea,
body.theme-raed #main-content salla-product-options .s-form-control {
  background-color: var(--psq-black) !important;
  border: 1px solid var(--psq-line-2) !important;
  border-radius: 8px !important;
  color: var(--psq-white) !important;
  min-height: var(--psq-field-h) !important;
  height: var(--psq-field-h) !important;
  font-size: 13px !important;
  padding: 0 12px !important;
}

body.theme-raed #main-content .product-form input::placeholder,
body.theme-raed #main-content salla-product-options input::placeholder { color: var(--psq-muted) !important; }

body.theme-raed #main-content salla-product-options select option {
  background-color: var(--psq-panel) !important;
  color: var(--psq-white) !important;
}

body.theme-raed #main-content .product-form .s-form-group { margin-bottom: 10px !important; }

/* الكمية: بلا أي حدود */
body.theme-raed #main-content salla-quantity-input,
body.theme-raed #main-content salla-quantity-input *,
body.theme-raed #main-content .s-quantity-input,
body.theme-raed #main-content .s-quantity-input * {
  background-color: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

body.theme-raed #main-content salla-quantity-input {
  display: inline-flex !important;
  align-items: center !important;
}

body.theme-raed #main-content salla-quantity-input input {
  color: var(--psq-white) !important;
  text-align: center !important;
  font-weight: 700 !important;
  width: 44px !important;
  min-height: 34px !important;
  font-size: 13px !important;
}

body.theme-raed #main-content salla-quantity-input button {
  color: var(--psq-text) !important;
  width: 32px !important;
  min-height: 34px !important;
  font-size: 13px !important;
}

body.theme-raed #main-content salla-quantity-input button:hover { color: var(--psq-cyan) !important; }

/* أزرار الشراء */
body.theme-raed #main-content salla-add-product-button .s-button-element,
body.theme-raed #main-content .sticky-product-bar salla-add-product-button .s-button-element {
  background-color: var(--psq-btn-bg) !important;
  color: var(--psq-btn-fg) !important;
  border: 0 !important;
  border-radius: 8px !important;
  font-weight: 800 !important;
  min-height: var(--psq-btn-h) !important;
  font-size: 13px !important;
}

body.theme-raed #main-content salla-quick-buy .s-button-element {
  background-color: var(--psq-black) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: var(--psq-white) !important;
  border-radius: 8px !important;
  font-weight: 800 !important;
  min-height: var(--psq-btn-h) !important;
  font-size: 13px !important;
}

body.theme-raed #main-content salla-quick-buy .s-button-element:hover {
  background-color: var(--psq-cyan) !important;
  border-color: var(--psq-cyan) !important;
  color: var(--psq-deep) !important;
}

/* طرق الدفع */
body.theme-raed .product-form salla-payments,
body.theme-raed .container--product-details salla-payments {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 8px !important;
  margin-top: 16px !important;
  padding-top: 14px !important;
  border-top: 1px solid var(--psq-line) !important;
  background-color: transparent !important;
}

body.theme-raed salla-payments img {
  height: 26px !important;
  width: auto !important;
  background-color: var(--psq-white) !important;
  border-radius: 6px !important;
  padding: 3px 6px !important;
}

/* ══════════ 6 · «أكمل طلبك» ══════════ */

body.theme-raed salla-bought-together {
  display: block !important;
  background-color: var(--psq-black) !important;
  border: 1px solid var(--psq-line) !important;
  border-radius: 12px !important;
  padding: 16px !important;
  overflow: hidden !important;
}

body.theme-raed salla-bought-together * {
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.theme-raed salla-bought-together h2,
body.theme-raed salla-bought-together h3 {
  color: var(--psq-white) !important;
  font-weight: 800 !important;
  margin: 0 0 4px !important;
}

body.theme-raed salla-bought-together p {
  color: var(--psq-muted) !important;
  font-size: 13px !important;
  margin: 0 0 12px !important;
}

body.theme-raed salla-bought-together li,
body.theme-raed salla-bought-together .s-list-tile,
body.theme-raed salla-bought-together label {
  border-bottom: 1px solid var(--psq-line) !important;
  padding: 12px 0 !important;
  margin: 0 !important;
  color: var(--psq-text) !important;
}

body.theme-raed salla-bought-together li:last-child,
body.theme-raed salla-bought-together .s-list-tile:last-child { border-bottom: 0 !important; }

body.theme-raed salla-bought-together img {
  width: 52px !important;
  height: 52px !important;
  object-fit: cover !important;
  border-radius: 8px !important;
}

body.theme-raed salla-bought-together input[type="checkbox"] { accent-color: var(--psq-cyan) !important; }

body.theme-raed salla-bought-together [class*="price"] {
  color: var(--psq-white) !important;
  font-weight: 700 !important;
}

body.theme-raed salla-bought-together .s-button-element {
  background-color: var(--psq-cyan) !important;
  color: var(--psq-deep) !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
  min-height: 46px !important;
  margin-top: 14px !important;
}

/* ══════════ 7 · التقييمات ══════════
   المكوّن يبني واجهته بالـJS بأسماء غير ثابتة:
   تغطية شاملة أولاً ثم استثناءات بعدها. */

body.theme-raed salla-comments,
body.theme-raed salla-reviews,
body.theme-raed salla-reviews-page,
body.theme-raed salla-comments *,
body.theme-raed salla-reviews *,
body.theme-raed salla-reviews-page * {
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: var(--psq-text) !important;
}

body.theme-raed salla-comments,
body.theme-raed salla-reviews,
body.theme-raed salla-reviews-page {
  display: block !important;
  background-color: var(--psq-bg) !important;
}

/* التعليق: صف مسطّح بفاصل سفلي */
body.theme-raed salla-comment-item,
body.theme-raed salla-review-card,
body.theme-raed .s-comments-item {
  display: block !important;
  border-bottom: 1px solid var(--psq-line) !important;
  padding: 18px 0 !important;
}

body.theme-raed salla-comment-item:last-child,
body.theme-raed salla-review-card:last-child { border-bottom: 0 !important; }

body.theme-raed salla-comment-item h3,
body.theme-raed salla-comment-item h4,
body.theme-raed salla-comment-item strong,
body.theme-raed salla-reviews h2,
body.theme-raed salla-reviews h3 { color: var(--psq-white) !important; }

body.theme-raed salla-comment-item time,
body.theme-raed [class*="s-comments-item-date"] { color: var(--psq-muted) !important; }

body.theme-raed [class*="verified"] { color: var(--psq-cyan) !important; }

body.theme-raed salla-rating-stars i,
body.theme-raed [class*="s-rating"] i { color: #FBBF24 !important; }

body.theme-raed salla-comments progress,
body.theme-raed [class*="s-rating-bar"] {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-radius: 999px !important;
  height: 8px !important;
  overflow: hidden !important;
}

body.theme-raed salla-comments progress::-webkit-progress-value,
body.theme-raed [class*="s-rating-bar"] > * { background-color: var(--psq-cyan) !important; }

body.theme-raed salla-comment-form input,
body.theme-raed salla-comment-form textarea,
body.theme-raed salla-comments select {
  background-color: var(--psq-black) !important;
  border: 1px solid var(--psq-line) !important;
  border-radius: 10px !important;
  color: var(--psq-white) !important;
}

body.theme-raed salla-comments .s-button-element,
body.theme-raed salla-reviews .s-button-element {
  background-color: var(--psq-cyan) !important;
  color: var(--psq-deep) !important;
  border: 0 !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
}

body.theme-raed salla-comments img { border-radius: 50% !important; }

/* ══════════ 8 · السلة والنوافذ والتذييل ══════════ */

body.theme-raed .s-modal-container,
body.theme-raed .s-cart-summary-wrapper.s-modal-container,
body.theme-raed .cart-item,
body.theme-raed .side-panel {
  background-color: var(--psq-panel) !important;
  color: var(--psq-white) !important;
  border: 1px solid var(--psq-line) !important;
  border-radius: 12px !important;
}

body.theme-raed salla-add-product-toast,
body.theme-raed .s-add-product-toast {
  background-color: var(--psq-panel) !important;
  color: var(--psq-text) !important;
  border: 1px solid var(--psq-line) !important;
  border-radius: 12px !important;
}

body.theme-raed .breadcrumbs,
body.theme-raed salla-breadcrumb {
  background-color: var(--psq-bg) !important;
  color: var(--psq-muted) !important;
}

body.theme-raed .breadcrumbs a { color: var(--psq-white) !important; }

body.theme-raed .store-footer {
  background-color: var(--psq-deep) !important;
  color: var(--psq-white) !important;
  border: 1px solid var(--psq-line) !important;
  border-radius: 12px !important;
  margin: 16px 16px 30px !important;
  overflow: hidden !important;
}

body.theme-raed .store-footer__inner {
  background-color: transparent !important;
  border: 0 !important;
}

body.theme-raed .store-footer h3,
body.theme-raed .store-footer h4,
body.theme-raed .store-footer p,
body.theme-raed .store-footer li,
body.theme-raed .store-footer a { color: var(--psq-white) !important; }

body.theme-raed .store-footer a:hover { color: var(--psq-cyan) !important; }

body.theme-raed .copyrights,
body.theme-raed .store-footer__inner + div {
  background-color: transparent !important;
  color: var(--psq-muted) !important;
}

/* ══════════ 9 · الجوال ══════════ */

@media (max-width: 767px) {
  :root {
    --psq-poster-max: 100%;
    --psq-thumb: 48px;
    --psq-field-h: 38px;
    --psq-btn-h: 40px;
    --psq-gap: 32px;
  }

  /* Pixel Zone بلا شريط علوي على الجوال — احذفها لإبقائه */
  body.theme-raed .top-navbar { display: none !important; }

  body.theme-raed .store-header .container,
  body.theme-raed #main-content .container {
    max-width: 100% !important;
    padding-right: 15px !important;
    padding-left: 15px !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  body.theme-raed #main-content > .s-block,
  body.theme-raed #main-content > section {
    margin-top: var(--psq-gap) !important;
    padding: 0 15px !important;
  }


  body.theme-raed .product-single h1 { font-size: 17px !important; }

  body.theme-raed .s-product-card-content-title { font-size: 13px !important; }

  body.theme-raed .s-product-card-price,
  body.theme-raed .s-product-card-sale-price > h4 { font-size: 14px !important; }

  body.theme-raed custom-salla-product-card salla-button:not(.s-product-card-wishlist-btn) .s-button-element {
    min-height: 40px !important;
    font-size: 12px !important;
  }

  body.theme-raed .s-product-card-promotion-title {
    font-size: 9px !important;
    padding: 2px 6px !important;
    max-width: 58% !important;
  }

  body.theme-raed .s-product-card-wishlist-btn .s-button-element {
    width: 28px !important;
    height: 28px !important;
    font-size: 13px !important;
  }

  body.theme-raed .tab-trigger .s-button-element {
    min-height: 36px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
  }

  body.theme-raed .s-user-menu-login-btn,
  body.theme-raed .header-signInBtn,
  body.theme-raed .store-header a[href*="/login"] {
    height: 36px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
  }

  body.theme-raed,
  body.theme-raed #app { overflow-x: hidden !important; }
}