/* Phase 18.9.5.28.5.8.9.50.4 — Dark Mode Professional Readability & Typography Final Pass
   هدف الملف: آخر طبقة فوق كل ملفات الدارك مود السابقة لضبط وضوح الكلام والتباين بدون تغميق صور المنتجات. */
html[data-marketak-theme="dark"]{
  --dm504-bg:#06101d;
  --dm504-surface:#0b1628;
  --dm504-surface2:#101d33;
  --dm504-surface3:#14233c;
  --dm504-border:rgba(148,163,184,.30);
  --dm504-text:#f5f9ff;
  --dm504-title:#ffffff;
  --dm504-muted:#c5d3e6;
  --dm504-soft:#9fb2ca;
  --dm504-blue:#7cc7ff;
  --dm504-cyan:#8cf3ff;
  --dm504-green:#86efac;
  --dm504-warning:#fde68a;
  --dm504-cardShadow:0 28px 85px rgba(0,0,0,.42);
}
html[data-marketak-theme="dark"] body{background:#06101d!important;color:var(--dm504-text)!important;}
html[data-marketak-theme="dark"] :where(.section-head h1,.section-head h2,.section-head h3,.page-title,h1,h2,h3,h4,strong,b,label,summary){color:var(--dm504-title)!important;opacity:1!important;text-shadow:none!important;}
html[data-marketak-theme="dark"] :where(p,.section-sub,small,.muted,.text-muted,.desc,.meta,li,span){opacity:1;}

/* =========================
   Home storefront rails/cards
   ========================= */
html[data-marketak-theme="dark"] :where(.home-product-rail-v186,.product-marquee,.exclusive-offers-marquee-v62,.category-marquee-pro,.home-store-rail-v186,.store-rail-v23){
  background:linear-gradient(145deg,rgba(6,16,29,.96),rgba(11,22,40,.98))!important;
  border:1px solid rgba(148,163,184,.22)!important;
  box-shadow:0 24px 75px rgba(0,0,0,.32)!important;
}
html[data-marketak-theme="dark"] :where(.home-product-tile-v186,.mini-product,.exclusive-offer-card-v62){
  background:linear-gradient(180deg,#111c31 0%,#0b1628 100%)!important;
  border:1px solid rgba(96,165,250,.34)!important;
  color:var(--dm504-text)!important;
  box-shadow:0 20px 60px rgba(0,0,0,.30)!important;
}
html[data-marketak-theme="dark"] :where(.home-product-tile-v186 .hp-img-v186,.mini-product img,.exclusive-offer-card-v62 .offer-img-v62){
  background:#f8fafc!important;
}
html[data-marketak-theme="dark"] :where(.home-product-tile-v186 .hp-body-v186,.exclusive-offer-card-v62 .offer-info-v62){
  background:linear-gradient(180deg,#111c31,#0b1628)!important;
  color:var(--dm504-text)!important;
}
html[data-marketak-theme="dark"] :where(.home-product-tile-v186 h3,.home-product-tile-v186 h3 a,.mini-product span,.exclusive-offer-card-v62 b){color:#dff1ff!important;opacity:1!important;}
html[data-marketak-theme="dark"] :where(.home-product-tile-v186 small,.exclusive-offer-card-v62 small){color:#aec2dc!important;opacity:1!important;}
html[data-marketak-theme="dark"] :where(.home-product-tile-v186 .hp-price-v186 b,.mini-product b,.exclusive-offer-card-v62 .offer-price-v62 strong){color:#7dd3fc!important;opacity:1!important;}
html[data-marketak-theme="dark"] :where(.home-product-tile-v186 .hp-cta-v186,.exclusive-offer-card-v62 .offer-cta-v62){color:#fff!important;background:linear-gradient(135deg,#2563eb,#7c3aed)!important;}
html[data-marketak-theme="dark"] :where(.category-motion-card,.home-category-card-v186,.category-card){
  background:linear-gradient(180deg,#101d33,#0b1628)!important;
  border-color:rgba(96,165,250,.30)!important;
  color:#eaf6ff!important;
}
html[data-marketak-theme="dark"] :where(.category-motion-card strong,.home-category-card-v186 strong,.category-card strong){color:#f8fbff!important;opacity:1!important;}
html[data-marketak-theme="dark"] :where(.category-motion-card small,.home-category-card-v186 small,.category-card small){color:#bed0e8!important;opacity:1!important;}

/* =========================
   Product detail readability
   ========================= */
html[data-marketak-theme="dark"] body :where(.product-super-page,.product-v23){background:#06101d!important;color:var(--dm504-text)!important;}
html[data-marketak-theme="dark"] body :where(.product-super-page .product-buy-panel,.product-super-page .info-panel,.product-super-page .product-long-description,.reviews-grid-v23 .info-panel){
  background:linear-gradient(145deg,#0b1628,#111c31)!important;
  border:1px solid rgba(148,163,184,.30)!important;
  color:var(--dm504-text)!important;
  box-shadow:var(--dm504-cardShadow)!important;
}
html[data-marketak-theme="dark"] body :where(.product-super-page .product-buy-panel,.product-super-page .info-panel,.reviews-grid-v23 .info-panel) :where(h1,h2,h3,h4,b,strong,label,summary){color:#f8fbff!important;opacity:1!important;}
html[data-marketak-theme="dark"] body :where(.product-super-page .product-buy-panel,.product-super-page .info-panel,.reviews-grid-v23 .info-panel) :where(p,span,small,li,.section-sub,.product-short){color:#c4d4e8!important;opacity:1!important;}
html[data-marketak-theme="dark"] body .product-super-page .product-buy-panel > *:not(.product-top-actions-v29){opacity:1!important;}
html[data-marketak-theme="dark"] body :where(.product-price-line,.product-stock-pro-v57,.product-return-policy-card-v118,.product-digital-policy-card-v189541,.product-deposit-badge-v18953,.product-variant-picker-v185,.product-options-v28,.add-cart-box,.order-card-pro,.review-card-v23,.product-specs-table-v28,.variant-axis-group-v185,.variant-match-card-v185){
  background:rgba(2,8,23,.55)!important;
  border:1px solid rgba(148,163,184,.24)!important;
  color:#eaf6ff!important;
}
html[data-marketak-theme="dark"] body :where(.product-price-line,.product-stock-pro-v57,.product-return-policy-card-v118,.product-digital-policy-card-v189541,.product-deposit-badge-v18953,.product-variant-picker-v185,.product-options-v28,.add-cart-box,.order-card-pro,.review-card-v23,.variant-axis-group-v185,.variant-match-card-v185) :where(h2,h3,b,strong,label,span,p,small){opacity:1!important;}
html[data-marketak-theme="dark"] body :where(.product-price-line .current-price,.product-price-line b,.product-price-line strong,.product-super-page .price,.current-price){color:#7dd3fc!important;}
html[data-marketak-theme="dark"] body :where(.product-stock-pro-v57.ok,.product-return-policy-card-v118.returnable,.product-digital-policy-card-v189541){background:rgba(6,78,59,.18)!important;border-color:rgba(52,211,153,.38)!important;}
html[data-marketak-theme="dark"] body :where(.product-stock-pro-v57.ok b,.product-stock-pro-v57.ok strong,.product-return-policy-card-v118.returnable b){color:#a7f3d0!important;}
html[data-marketak-theme="dark"] body :where(.product-specs-table-v28 table,.product-specs-table-v28 tr,.product-specs-table-v28 td,.product-specs-table-v28 th){background:rgba(11,22,40,.96)!important;color:#eaf6ff!important;border-color:rgba(148,163,184,.25)!important;}
html[data-marketak-theme="dark"] body .product-super-page :where(input,select,textarea){background:#0a1324!important;color:#f8fbff!important;border-color:rgba(148,163,184,.35)!important;}
html[data-marketak-theme="dark"] body .product-super-page :where(input::placeholder,textarea::placeholder){color:#9fb2ca!important;opacity:1!important;}
/* Keep media backgrounds natural */
html[data-marketak-theme="dark"] body :where(.gallery-stage,.main-media-box,.media-stage-v23,.thumb-btn,.share-preview-thumb-v58,.product-super-page .hp-img-v186){background:#f8fafc!important;color:#0f172a!important;}
html[data-marketak-theme="dark"] body :where(.gallery-stage,.main-media-box,.media-stage-v23) img{filter:none!important;}

/* =========================
   Share modals / welcome modal
   ========================= */
html[data-marketak-theme="dark"] body :where(.share-center-card-v58,.share-store-modal,.store-share-modal,.marketak-popup,.welcome-modal,.modal-card,.popup-card,.marketak-flash-card-v189511){
  background:linear-gradient(145deg,#0b1628,#111c31)!important;
  border:1px solid rgba(148,163,184,.30)!important;
  color:#f8fbff!important;
  box-shadow:0 30px 100px rgba(0,0,0,.55)!important;
}
html[data-marketak-theme="dark"] body :where(.share-center-card-v58,.share-store-modal,.store-share-modal,.marketak-popup,.welcome-modal,.modal-card,.popup-card,.marketak-flash-card-v189511) :where(h1,h2,h3,b,strong,label){color:#f8fbff!important;opacity:1!important;}
html[data-marketak-theme="dark"] body :where(.share-center-card-v58,.share-store-modal,.store-share-modal,.marketak-popup,.welcome-modal,.modal-card,.popup-card,.marketak-flash-card-v189511) :where(p,span,small){color:#c4d4e8!important;opacity:1!important;}
html[data-marketak-theme="dark"] body :where(.share-action-v58,.share-copy-row-v58 input,.share-copy-row-v58 button){background:#0a1324!important;color:#eaf6ff!important;border-color:rgba(148,163,184,.30)!important;}

/* =========================
   Storefront independent store
   ========================= */
html[data-marketak-theme="dark"] body :where(.storefront-tabs,.storefront-tabs-wrap,.storefront-section,.storefront-panel,.store-products-panel,.store-category-card,.store-filter-panel,.store-products-filter,.store-sidebar,.store-share-card,.store-card){
  background:linear-gradient(145deg,#0b1628,#111c31)!important;
  border-color:rgba(148,163,184,.28)!important;
  color:#f5f9ff!important;
}
html[data-marketak-theme="dark"] body :where(.storefront-tabs,.storefront-tabs-wrap,.storefront-section,.storefront-panel,.store-products-panel,.store-category-card,.store-filter-panel,.store-products-filter,.store-sidebar,.store-share-card,.store-card) :where(h1,h2,h3,b,strong,label){color:#fff!important;opacity:1!important;}
html[data-marketak-theme="dark"] body :where(.storefront-tabs,.storefront-tabs-wrap,.storefront-section,.storefront-panel,.store-products-panel,.store-category-card,.store-filter-panel,.store-products-filter,.store-sidebar,.store-share-card,.store-card) :where(p,span,small){color:#c4d4e8!important;opacity:1!important;}
html[data-marketak-theme="dark"] body :where(.storefront-tabs a,.storefront-tabs button,.store-tabs a,.store-tabs button){background:#f8fafc!important;color:#0f172a!important;border-color:rgba(148,163,184,.26)!important;}
html[data-marketak-theme="dark"] body :where(.storefront-tabs a.active,.storefront-tabs button.active,.store-tabs a.active,.store-tabs button.active){background:linear-gradient(135deg,#2563eb,#7c3aed)!important;color:#fff!important;}

/* =========================
   Products page filters/cards
   ========================= */
html[data-marketak-theme="dark"] body :where(.products-page,.products-main,.products-layout){background:#06101d!important;color:#f5f9ff!important;}
html[data-marketak-theme="dark"] body :where(.filters-panel,.products-filter-card,.filter-card,.filter-box,.products-sidebar,.filters-sidebar){
  background:linear-gradient(145deg,#0b1628,#111c31)!important;
  border:1px solid rgba(148,163,184,.28)!important;
  color:#f8fbff!important;
}
html[data-marketak-theme="dark"] body :where(.filters-panel,.products-filter-card,.filter-card,.filter-box,.products-sidebar,.filters-sidebar) :where(h2,h3,b,strong,label,summary){color:#fff!important;opacity:1!important;}
html[data-marketak-theme="dark"] body :where(.filters-panel,.products-filter-card,.filter-card,.filter-box,.products-sidebar,.filters-sidebar) :where(span,p,small){color:#c4d4e8!important;opacity:1!important;}
html[data-marketak-theme="dark"] body :where(.products-toolbar,.products-count-box,.results-summary){background:rgba(15,23,42,.95)!important;color:#eaf6ff!important;border-color:rgba(148,163,184,.25)!important;}

/* =========================
   Plans page final contrast
   ========================= */
html[data-marketak-theme="dark"] body .plans-v189525-page{background:#06101d!important;color:#f5f9ff!important;}
html[data-marketak-theme="dark"] body :where(.pricing-pro-card,.pricing-card-v189525,.trial-plan-v189525,.vendor-plan-status-card-v189525,.compare-table-card-v189525,.upgrade-card-v189525){
  background:linear-gradient(145deg,#0b1628,#111c31)!important;
  border:1px solid rgba(148,163,184,.28)!important;
  color:#f8fbff!important;
  box-shadow:0 24px 80px rgba(0,0,0,.34)!important;
}
html[data-marketak-theme="dark"] body :where(.pricing-pro-card,.pricing-card-v189525,.trial-plan-v189525,.vendor-plan-status-card-v189525,.compare-table-card-v189525,.upgrade-card-v189525) :where(h2,h3,b,strong,label,span){opacity:1!important;}
html[data-marketak-theme="dark"] body :where(.pricing-pro-card,.pricing-card-v189525,.trial-plan-v189525,.vendor-plan-status-card-v189525,.compare-table-card-v189525,.upgrade-card-v189525) :where(h2,h3,b,strong){color:#f8fbff!important;}
html[data-marketak-theme="dark"] body :where(.pricing-pro-card,.pricing-card-v189525,.trial-plan-v189525,.vendor-plan-status-card-v189525,.compare-table-card-v189525,.upgrade-card-v189525) :where(p,small,li){color:#c4d4e8!important;opacity:1!important;}
html[data-marketak-theme="dark"] body :where(.plan-price-v1895251,.plan-duration-tile-v1895251,.plan-summary-strip-v1895252 span){background:#071126!important;color:#f8fbff!important;border-color:rgba(148,163,184,.28)!important;}
html[data-marketak-theme="dark"] body :where(.plan-price-v1895251 b,.plan-price-v1895251 small,.plan-duration-tile-v1895251 b,.plan-duration-tile-v1895251 small,.plan-summary-strip-v1895252 b,.plan-summary-strip-v1895252 small){color:#f8fbff!important;opacity:1!important;}
html[data-marketak-theme="dark"] body .plan-duration-tile-v1895251.selected{background:linear-gradient(135deg,rgba(37,99,235,.42),rgba(14,165,233,.24))!important;border-color:rgba(96,165,250,.65)!important;}
html[data-marketak-theme="dark"] body :where(.compare-table-v189525 th,.compare-table-v189525 td){background:#101d33!important;color:#f8fbff!important;border-color:rgba(148,163,184,.24)!important;}
html[data-marketak-theme="dark"] body .compare-table-v189525 tr:nth-child(even) :where(th,td){background:#17233a!important;}

/* =========================
   Legal/referral/auth light cards left behind
   ========================= */
html[data-marketak-theme="dark"] body :where(.legal-content-card,.legal-card,.referral-page .card,.referral-page .panel,.auth-card,.login-card,.register-card,.contact-card){
  background:linear-gradient(145deg,#0b1628,#111c31)!important;
  color:#f5f9ff!important;
  border-color:rgba(148,163,184,.28)!important;
}
html[data-marketak-theme="dark"] body :where(.legal-content-card,.legal-card,.referral-page .card,.referral-page .panel,.auth-card,.login-card,.register-card,.contact-card) :where(h1,h2,h3,b,strong,label){color:#fff!important;opacity:1!important;}
html[data-marketak-theme="dark"] body :where(.legal-content-card,.legal-card,.referral-page .card,.referral-page .panel,.auth-card,.login-card,.register-card,.contact-card) :where(p,span,small,li){color:#c4d4e8!important;opacity:1!important;}

/* =========================
   Safe contrast fallback for known white panels in dark mode
   يحل مشكلة الكلام الأبيض فوق خلفية فاتحة: إن بقيت اللوحة فاتحة لأي سبب، خلي النص داكن بوضوح.
   ========================= */
html[data-marketak-theme="dark"] body :where(.white-card,.light-card,.soft-card,.blank-card,.notice-card,.empty-card,.home-ad-card,.welcome-box,.stats-light-card)[style*="background:#fff"],
html[data-marketak-theme="dark"] body :where(.white-card,.light-card,.soft-card,.blank-card,.notice-card,.empty-card,.home-ad-card,.welcome-box,.stats-light-card).is-light{
  color:#0f172a!important;
}
html[data-marketak-theme="dark"] body :where(.white-card,.light-card,.soft-card,.blank-card,.notice-card,.empty-card,.home-ad-card,.welcome-box,.stats-light-card)[style*="background:#fff"] :where(h1,h2,h3,b,strong,label,p,span,small,li),
html[data-marketak-theme="dark"] body :where(.white-card,.light-card,.soft-card,.blank-card,.notice-card,.empty-card,.home-ad-card,.welcome-box,.stats-light-card).is-light :where(h1,h2,h3,b,strong,label,p,span,small,li){
  color:#0f172a!important;opacity:1!important;
}

/* Final interaction/readability details */
html[data-marketak-theme="dark"] body :where(.btn,.hp-cta-v186,.plan-submit-v1895251,button[type="submit"]){font-weight:900!important;}
html[data-marketak-theme="dark"] body :where(.btn.ghost,.ghost,.secondary,.mini-btn){background:#0f1b2f!important;color:#eaf6ff!important;border-color:rgba(148,163,184,.30)!important;}
html[data-marketak-theme="dark"] body :where(.btn,.primary,.wide):not(.ghost){color:#fff!important;}
html[data-marketak-theme="dark"] body :where(.ann-bar,.announcement-bar,.top-announcement){background:rgba(15,23,42,.92)!important;color:#f8fbff!important;border-color:rgba(148,163,184,.22)!important;}
html[data-marketak-theme="dark"] body :where(.ann-bar,.announcement-bar,.top-announcement) *{color:#f8fbff!important;opacity:1!important;}
@media (max-width: 760px){
  html[data-marketak-theme="dark"] body :where(.home-product-rail-v186,.product-marquee,.exclusive-offers-marquee-v62){border-radius:22px!important;}
  html[data-marketak-theme="dark"] body :where(.product-super-page .product-buy-panel,.product-super-page .info-panel){box-shadow:0 20px 55px rgba(0,0,0,.35)!important;}
}
