/* طبقة مستقلة فوق هوية بوابة التوفيق الجديدة: لا تعدّل حزم React الأصلية. */
[data-sonner-toaster] {
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  left: 50% !important;
  width: min(92vw, 420px) !important;
  transform: translate(-50%, -50%) !important;
  z-index: 2147483000 !important;
}

/* أسعار الواجهة العامة. */
.product-bottom > strong,
.marquee-preview-copy > b,
.detail-price,
.price-hint,
.option-values small,
.price-on-request,
.product-card-skeleton-price,
.detail-skeleton-price {
  display: none !important;
}

/* التصفية: الزر عائم ولا تحجز اللوحة أي مساحة عند الإغلاق. */
.filters-panel.brand-filter-hidden {
  display: none !important;
}
.brand-filter-launcher {
  position: fixed;
  top: max(5.25rem, env(safe-area-inset-top, 0px));
  right: 1rem;
  z-index: 2147482000;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .7rem .95rem;
  border: 1px solid rgba(121, 88, 41, .3);
  border-radius: 999px;
  background: #fffdf9;
  color: #3f3325;
  box-shadow: 0 12px 30px rgba(42, 28, 13, .16);
  font: 600 .82rem/1 "Noto Kufi Arabic", sans-serif;
  cursor: pointer;
}
.brand-filter-launcher[aria-expanded="true"] {
  background: #9b722e;
  border-color: #9b722e;
  color: #fff;
}
.brand-filter-launcher .brand-filter-icon { font-size: 1.1rem; line-height: 1; }

/* يضاف هذا النمط فقط بعد العثور على مجموعات الفلتر المناسبة. */
.filter-group.brand-price-filter-hidden { display: none !important; }

@media (max-width: 640px) {
  .brand-filter-launcher {
    top: auto;
    bottom: 1rem;
    right: 1rem;
  }
}

/* تصحيح الكتالوج المكتبي: تبقى النتائج في مساحة المحتوى الكاملة عند إغلاق الفلاتر. */
@media (min-width: 768px) {
  .catalog-layout {
    display: block !important;
    width: 100% !important;
  }
  .catalog-results,
  .catalog-layout > .catalog-results {
    width: 100% !important;
    min-width: 0 !important;
  }
  .catalog-layout .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1.25rem !important;
    width: 100% !important;
  }
  .catalog-layout .products-grid.as-list {
    grid-template-columns: 1fr !important;
  }
  .catalog-layout .filters-panel:not(.brand-filter-hidden) {
    position: static !important;
    top: auto !important;
    width: 100% !important;
    margin: 0 0 1rem !important;
  }
  .catalog-layout > .brand-filter-launcher {
    position: sticky !important;
    top: 5.75rem !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 1200 !important;
    width: fit-content;
    margin: 0 0 1rem auto !important;
  }
}

/* قائمة الثيمات يجب أن تبقى فوق عناصر الرأس والمحتوى ولا تُقصّ. */
.theme-picker {
  position: relative !important;
  z-index: 5000 !important;
}
.theme-picker.is-open .theme-picker-options {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 5001 !important;
}

/* إخفاء أي نص سعري متبقٍ في التأكيد وملخصات الطلب العامة. */
.confirmation-state .price-on-request,
.confirmation-state .summary-total,
.confirmation-state [data-price],
.confirmation-state .detail-price,
.confirmation-state .price-hint,
.checkout-layout .price-on-request,
.order-summary .price-on-request {
  display: none !important;
}
