/* ==================================================
   DQA PLUS - كود CSS موحد وآمن
   احذف كل الأكواد السابقة والصق هذا الكود فقط
================================================== */

:root {
  --dqa-dark: #071827;
  --dqa-dark-2: #0B1F33;
  --dqa-gold: #D4A62A;
  --dqa-white: #FFFFFF;
  --dqa-text-dark: #111827;
  --dqa-text-light: #F5F7FA;
  --dqa-muted: #D6E0EC;
}

/* خلفية الموقع */
html,
body {
  background-color: var(--dqa-dark) !important;
  color: var(--dqa-text-light) !important;
}

/* منع الخلفيات البيضاء العامة من تغطية الموقع */
main,
.main-content,
.store-content,
.page-content,
.s-store-page {
  background: transparent !important;
}

/* ==================================================
   الهيدر والقائمة العلوية
================================================== */

header,
.s-header,
.store-header,
.main-nav,
.navbar {
  background: #FFFFFF !important;
}

header *,
.s-header *,
.store-header *,
.main-nav *,
.navbar * {
  color: var(--dqa-dark-2) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* الشريط العلوي الداكن */
.top-bar,
.announcement-bar,
.s-topbar {
  background: var(--dqa-dark-2) !important;
  color: #FFFFFF !important;
}

.top-bar *,
.announcement-bar *,
.s-topbar * {
  color: #FFFFFF !important;
}

/* البحث */
input[type="search"],
.search-input,
.s-search-input,
.s-search-container input {
  background: rgba(255,255,255,0.85) !important;
  color: var(--dqa-text-dark) !important;
}

input[type="search"]::placeholder {
  color: #6B7280 !important;
}

/* ==================================================
   عناوين الأقسام
================================================== */

.s-block__title,
.section-title,
.home-title,
section > h2,
.page-title,
.s-page-title {
  color: #FFFFFF !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.45) !important;
}

.section-description,
.s-block__description,
.sub-title {
  color: var(--dqa-muted) !important;
  opacity: 1 !important;
}

/* ==================================================
   بطاقات تصفح الأقسام
================================================== */

.category-card,
.s-category-card,
.category-cards a,
.s-block--categories a,
[class*="category-card"] {
  background: #FFFFFF !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 22px rgba(0,0,0,0.12) !important;
}

.category-card *,
.s-category-card *,
.category-cards a *,
.s-block--categories a *,
[class*="category-card"] * {
  color: var(--dqa-text-dark) !important;
  opacity: 1 !important;
  visibility: visible !important;
  font-weight: 700 !important;
}

/* ==================================================
   تبويبات المنتجات
================================================== */

.tabs a,
.nav-tabs a,
.s-products-tabs a,
.tabby__item,
.tabby__item a {
  color: #BFCBDD !important;
  opacity: 1 !important;
  font-weight: 600 !important;
}

.tabs .active,
.tabs .active a,
.nav-tabs .active,
.nav-tabs .active a,
.s-products-tabs .active,
.s-products-tabs .active a,
.tabby__item.active,
.tabby__item.active a,
.tabby__item--active,
.tabby__item--active a {
  color: #FFFFFF !important;
  font-weight: 800 !important;
  border-bottom: 3px solid var(--dqa-gold) !important;
}

.tabs a:hover,
.nav-tabs a:hover,
.s-products-tabs a:hover,
.tabby__item a:hover {
  color: #FFFFFF !important;
}

/* ==================================================
   بطاقات المنتجات
================================================== */

.s-product-card,
.product-card,
.product-item,
.s-block--products .s-product-card {
  background: #FFFFFF !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 22px rgba(0,0,0,0.12) !important;
}

.s-product-card *,
.product-card *,
.product-item * {
  color: var(--dqa-text-dark) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.s-product-card .price,
.product-card .price,
.s-product-card-price,
.s-product-card__price,
.product-price {
  color: var(--dqa-dark-2) !important;
  font-weight: 800 !important;
}

/* زر إضافة للسلة داخل البطاقة */
.s-product-card button *,
.product-card button *,
.product-item button * {
  color: inherit !important;
}

/* ==================================================
   صفحات التصنيفات
================================================== */

.category-page h1,
.s-category h1,
h1.category-title,
.s-products-list h1,
.s-products-list-title {
  color: #FFFFFF !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.45) !important;
}

.sorting,
.sorting *,
.filter,
.filter *,
.filters,
.filters *,
.s-products-sort,
.s-products-sort *,
.s-filters,
.s-filters * {
  color: var(--dqa-text-light) !important;
  opacity: 1 !important;
}

select,
.s-products-sort select,
.s-filters select,
.sorting select {
  background: #FFFFFF !important;
  color: var(--dqa-dark-2) !important;
}

/* ==================================================
   صفحة المنتج
================================================== */

.product-single,
.product-details,
.product-page {
  background: transparent !important;
}

/* عنوان وسعر المنتج */
.product-single h1,
.product-single h2,
.product-details h1,
.product-details h2,
.product-title,
.product-name,
.product-single .price,
.product-details .price {
  color: #FFFFFF !important;
  opacity: 1 !important;
}

/* النصوص العامة في صفحة المنتج */
.product-single p,
.product-details p {
  color: var(--dqa-text-light) !important;
  opacity: 1 !important;
}

/* صورة المنتج */
.product-single img,
.product-details img {
  background: #FFFFFF !important;
}

/* مسار التنقل */
.breadcrumb,
.breadcrumb *,
.breadcrumbs,
.breadcrumbs * {
  color: #FFFFFF !important;
  opacity: 1 !important;
}

/* ==================================================
   وصف المنتج بدون مربعات بيضاء
================================================== */

.product-description,
.s-product-description,
.product__description,
#product-description,
.product-single .description,
.product-details .description,
.s-tabs-content,
.product-tabs,
.tab-content {
  background: transparent !important;
}

/* نص وصف المنتج */
.product-description *,
.s-product-description *,
.product__description *,
#product-description *,
.product-single .description *,
.product-details .description *,
.s-tabs-content *,
.product-tabs *,
.tab-content * {
  color: var(--dqa-text-light) !important;
  -webkit-text-fill-color: var(--dqa-text-light) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* عناوين داخل الوصف مثل: مميزات العرض / مناسب لـ / المواصفات */
.product-description h1,
.product-description h2,
.product-description h3,
.product-description h4,
.product-description strong,
.product-description b,
.s-product-description h1,
.s-product-description h2,
.s-product-description h3,
.s-product-description h4,
.s-product-description strong,
.s-product-description b,
.product__description h1,
.product__description h2,
.product__description h3,
.product__description h4,
.product__description strong,
.product__description b,
#product-description h1,
#product-description h2,
#product-description h3,
#product-description h4,
#product-description strong,
#product-description b,
.s-tabs-content h1,
.s-tabs-content h2,
.s-tabs-content h3,
.s-tabs-content h4,
.s-tabs-content strong,
.s-tabs-content b {
  color: var(--dqa-gold) !important;
  -webkit-text-fill-color: var(--dqa-gold) !important;
  font-weight: 800 !important;
}

/* النقاط داخل الوصف */
.product-description li,
.s-product-description li,
.product__description li,
#product-description li,
.s-tabs-content li,
.tab-content li {
  color: var(--dqa-text-light) !important;
  -webkit-text-fill-color: var(--dqa-text-light) !important;
}

.product-description li::marker,
.s-product-description li::marker,
.product__description li::marker,
#product-description li::marker,
.s-tabs-content li::marker,
.tab-content li::marker {
  color: var(--dqa-gold) !important;
}

/* ==================================================
   القوائم المنسدلة: حسابي / المزيد
================================================== */

.dropdown-menu,
.s-user-menu,
.user-menu,
.account-menu,
.header-dropdown,
.popover,
[class*="dropdown-menu"] {
  background: #FFFFFF !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
}

.dropdown-menu *,
.s-user-menu *,
.user-menu *,
.account-menu *,
.header-dropdown *,
.popover *,
[class*="dropdown-menu"] * {
  color: var(--dqa-dark-2) !important;
  -webkit-text-fill-color: var(--dqa-dark-2) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.dropdown-menu a:hover,
.s-user-menu a:hover,
.user-menu a:hover,
.account-menu a:hover,
.header-dropdown a:hover,
.popover a:hover {
  background: #F3F4F6 !important;
  color: var(--dqa-dark) !important;
}

/* ==================================================
   الفوتر
================================================== */

footer,
.s-footer {
  background: var(--dqa-dark-2) !important;
  color: #FFFFFF !important;
}

footer *,
.s-footer * {
  color: #FFFFFF !important;
  opacity: 1 !important;
}
/* ==================================================
   إصلاح عنوان قسم المدونة فقط
================================================== */

/* عناوين أقسام المدونة عندما تكون الخلفية فاتحة */
.s-block--blog .s-block__title,
.s-block--blog .section-title,
.s-block--blog h2,
.s-block--posts .s-block__title,
.s-block--posts .section-title,
.s-block--posts h2,
.blog-section .s-block__title,
.blog-section .section-title,
.blog-section h2,
.s-articles .s-block__title,
.s-articles .section-title,
.s-articles h2 {
  color: #0B1F33 !important;
  -webkit-text-fill-color: #0B1F33 !important;
  text-shadow: none !important;
  font-weight: 800 !important;
}

/* حل أقوى إذا كان قسم المدونة يستخدم بطاقات مقالات */
.s-block:has(.s-article-card) .s-block__title,
.s-block:has(.s-article-card) .section-title,
.s-block:has(.s-article-card) h2,
section:has(.s-article-card) .s-block__title,
section:has(.s-article-card) .section-title,
section:has(.s-article-card) h2 {
  color: #0B1F33 !important;
  -webkit-text-fill-color: #0B1F33 !important;
  text-shadow: none !important;
  font-weight: 800 !important;
}

/* نصوص بطاقات المقالات تبقى داكنة */
.s-article-card,
.s-article-card *,
.blog-card,
.blog-card *,
.article-card,
.article-card * {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  opacity: 1 !important;
}
/* ==================================================
   إصلاح نهائي لقسم المدونة في الصفحة الرئيسية
================================================== */

/* استهداف أي قسم يحتوي روابط مدونة */
section:has(a[href*="/blog"]),
.s-block:has(a[href*="/blog"]),
section:has(a[href*="/ar/blog"]),
.s-block:has(a[href*="/ar/blog"]) {
  background: #071827 !important;
  padding-top: 35px !important;
  padding-bottom: 35px !important;
}

/* عنوان قسم المدونة */
section:has(a[href*="/blog"]) h2,
section:has(a[href*="/blog"]) .s-block__title,
section:has(a[href*="/blog"]) .section-title,
section:has(a[href*="/blog"]) .home-title,
.s-block:has(a[href*="/blog"]) h2,
.s-block:has(a[href*="/blog"]) .s-block__title,
.s-block:has(a[href*="/blog"]) .section-title,
.s-block:has(a[href*="/blog"]) .home-title {
  color: #D4A62A !important;
  -webkit-text-fill-color: #D4A62A !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.45) !important;
  font-weight: 800 !important;
}

/* بطاقات المقالات تبقى واضحة */
section:has(a[href*="/blog"]) article,
section:has(a[href*="/blog"]) .card,
section:has(a[href*="/blog"]) [class*="card"],
.s-block:has(a[href*="/blog"]) article,
.s-block:has(a[href*="/blog"]) .card,
.s-block:has(a[href*="/blog"]) [class*="card"] {
  background: #FFFFFF !important;
  color: #111827 !important;
  border-radius: 12px !important;
}

/* نصوص بطاقات المقالات */
section:has(a[href*="/blog"]) article *,
section:has(a[href*="/blog"]) .card *,
section:has(a[href*="/blog"]) [class*="card"] *,
.s-block:has(a[href*="/blog"]) article *,
.s-block:has(a[href*="/blog"]) .card *,
.s-block:has(a[href*="/blog"]) [class*="card"] * {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  opacity: 1 !important;
}
/* ==================================================
   منع ظهور قائمة "المزيد" إلا عند الضغط/التركيز
================================================== */

/* إخفاء القوائم المنسدلة في القائمة العلوية افتراضيًا */
.main-nav .dropdown-menu,
.navbar .dropdown-menu,
.s-header__nav .dropdown-menu,
.s-nav-menu .dropdown-menu,
.main-menu .dropdown-menu,
.main-nav [class*="dropdown-menu"],
.navbar [class*="dropdown-menu"],
.s-header__nav [class*="dropdown-menu"],
.s-nav-menu [class*="dropdown-menu"],
.main-menu [class*="dropdown-menu"] {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* إظهارها فقط عند الضغط أو التركيز */
.main-nav li:focus-within > .dropdown-menu,
.navbar li:focus-within > .dropdown-menu,
.s-header__nav li:focus-within > .dropdown-menu,
.s-nav-menu li:focus-within > .dropdown-menu,
.main-menu li:focus-within > .dropdown-menu,
.main-nav .show > .dropdown-menu,
.navbar .show > .dropdown-menu,
.s-header__nav .show > .dropdown-menu,
.s-nav-menu .show > .dropdown-menu,
.main-menu .show > .dropdown-menu,
.main-nav .is-open > .dropdown-menu,
.navbar .is-open > .dropdown-menu,
.s-header__nav .is-open > .dropdown-menu,
.s-nav-menu .is-open > .dropdown-menu,
.main-menu .is-open > .dropdown-menu {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  background: #FFFFFF !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
}