/* ================================================
   الشهاب تك للبرمجيات - EasyOrders Sphinx Theme
   يستهدف Sphinx Theme + Tailwind CSS skin variables
   الإصدار: 2.0 - مبني على HTML الفعلي للمتجر
   ================================================ */

/* ── 1. تحميل خط Cairo العربي ── */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

/* ── 2. تغيير ألوان الثيم عبر CSS Variables ──
   EasyOrders يستخدم rgb(var(--color-primary))
   يجب كتابة الألوان كـ R, G, B وليس hex
   بنفسجي الشهاب تك: #6d28d9 = 109, 40, 217
   ── */
:root {
  --color-primary: 109, 40, 217 !important;
  --color-a11y: 255, 255, 255 !important;
}

/* ── 3. خط Cairo لكل الصفحة ── */
*,
p, span, div, li, a, h1, h2, h3, h4, h5, h6,
label, td, th, input, button, select, textarea {
  font-family: 'Cairo', 'Almarai', sans-serif !important;
}

/* ── 4. RTL ── */
body, html {
  direction: rtl !important;
  text-align: right !important;
}

/* ── 5. الهيدر الرئيسي .sphinx_header ── */
.sphinx_header {
  border-bottom: 2px solid rgba(109, 40, 217, 0.15) !important;
}

/* .sphinx_header_container - الشريط البنفسجي العلوي */
.sphinx_header_container {
  background: linear-gradient(135deg, #6d28d9 0%, #4f46e5 100%) !important;
  box-shadow: 0 4px 20px rgba(109, 40, 217, 0.35) !important;
}

/* .sphinx_header_links - شريط الروابط تحت الهيدر */
.sphinx_header_links {
  background: #f5f3ff !important;
  border-bottom: 1px solid rgba(109, 40, 217, 0.12) !important;
}

.sphinx_header_links a {
  color: #6d28d9 !important;
  font-weight: 600 !important;
  transition: color 0.2s !important;
}

.sphinx_header_links a:hover {
  color: #4f46e5 !important;
}

/* ── 6. Tailwind skin classes - يغير كل عناصر bg-skin-primary ── */
/* هذه الكلاسات مُعرّفة في Tailwind وتستخدم --color-primary */
/* بعد تعديل :root ستتغير تلقائياً، لكن نضيف override احتياطي */

.bg-skin-primary {
  background-color: rgb(109, 40, 217) !important;
  background: linear-gradient(135deg, #6d28d9 0%, #4f46e5 100%) !important;
}

.text-skin-a11y {
  color: #ffffff !important;
}

.text-skin-primary {
  color: #6d28d9 !important;
}

.border-skin-primary {
  border-color: #6d28d9 !important;
}

/* ── 7. زر البحث في الهيدر ── */
.sphinx_header_container button.bg-skin-primary,
.sphinx_header_container .bg-skin-primary {
  background: rgba(255, 255, 255, 0.25) !important;
  border-radius: 10px !important;
  backdrop-filter: blur(4px) !important;
}

.sphinx_header_container button.bg-skin-primary:hover {
  background: rgba(255, 255, 255, 0.4) !important;
}

/* input البحث */
.sphinx_header_container input[type="text"] {
  border-radius: 12px !important;
  border: none !important;
  font-family: 'Cairo', sans-serif !important;
  font-size: 14px !important;
}

.sphinx_header_container input[type="text"]:focus {
  outline: none !important;
  ring: none !important;
}

/* ── 8. زر سلة الشراء في الهيدر ── */
.sphinx_header_container .relative.p-2\.5,
.sphinx_header_container .relative.p-3,
button.relative.p-2\.5,
button.relative.p-3 {
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 50% !important;
  transition: background 0.2s !important;
}

.sphinx_header_container .relative.p-2\.5:hover,
.sphinx_header_container .relative.p-3:hover {
  background: rgba(255, 255, 255, 0.35) !important;
}

/* ── 9. كروت المنتجات ── */
main .grid > a,
main .grid > div:not(:empty) {
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
  background: #fff !important;
}

main .grid > a:hover,
main .grid > div:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 12px 32px rgba(109, 40, 217, 0.18) !important;
}

/* ── 10. عنوان الصفحة الرئيسية وعناوين الأقسام ── */
main h2,
main h1 {
  font-family: 'Cairo', sans-serif !important;
  font-weight: 800 !important;
  color: #1e0a3c !important;
}

main h3 {
  font-family: 'Cairo', sans-serif !important;
  font-weight: 700 !important;
}

/* خط تزيين تحت العناوين */
main h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #6d28d9, #4f46e5);
  border-radius: 2px;
  margin: 8px auto 0;
}

/* ── 11. أزرار إضافة للسلة وأزرار الشراء العامة ── */
button[class*="bg-skin"],
a[class*="bg-skin"],
button.bg-skin-primary,
a.bg-skin-primary {
  background: linear-gradient(135deg, #6d28d9 0%, #4f46e5 100%) !important;
  color: #fff !important;
  border-radius: 12px !important;
  font-family: 'Cairo', sans-serif !important;
  font-weight: 700 !important;
  transition: opacity 0.2s, transform 0.15s !important;
  border: none !important;
}

button[class*="bg-skin"]:hover,
a[class*="bg-skin"]:hover,
button.bg-skin-primary:hover,
a.bg-skin-primary:hover {
  opacity: 0.88 !important;
  transform: translateY(-2px) !important;
}

/* ── 12. بيدج الخصم ── */
.bg-\[\#F44336\] {
  background: #dc2626 !important;
  border-radius: 8px !important;
  font-family: 'Cairo', sans-serif !important;
  font-weight: 700 !important;
}

/* ── 13. الفوتر ── */
footer {
  background: #faf9ff !important;
}

/* الشريط السفلي "Powered By EasyOrders" */
.border-t.bg-skin-primary.text-skin-a11y {
  background: linear-gradient(135deg, #6d28d9 0%, #4f46e5 100%) !important;
  color: #fff !important;
}

.border-t.bg-skin-primary.text-skin-a11y a {
  color: #e9d5ff !important;
  font-weight: 600 !important;
}

.border-t.bg-skin-primary.text-skin-a11y a:hover {
  color: #fff !important;
  text-decoration: underline !important;
}

/* عناوين الفوتر */
footer h3.font-bold {
  color: #6d28d9 !important;
  font-weight: 700 !important;
}

/* روابط الفوتر */
footer a {
  color: #4b5563 !important;
  transition: color 0.2s !important;
}

footer a:hover {
  color: #6d28d9 !important;
}

/* ── 14. حقول الإدخال في الدفع ── */
input:not([type="radio"]):not([type="checkbox"]):not([type="submit"]),
select,
textarea {
  font-family: 'Cairo', sans-serif !important;
  border-radius: 10px !important;
  border: 1.5px solid #e5e7eb !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

input:not([type="radio"]):not([type="checkbox"]):not([type="submit"]):focus,
select:focus,
textarea:focus {
  border-color: #6d28d9 !important;
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.12) !important;
  outline: none !important;
}

/* ── 15. Disclosure Buttons (الفوتر الأقسام على موبايل) ── */
footer button[id^="headlessui-disclosure"] {
  font-family: 'Cairo', sans-serif !important;
}

/* ── 16. نص ألوان indigo المضمنة (override) ── */
.text-indigo-600 {
  color: #6d28d9 !important;
}

.hover\:text-indigo-500:hover {
  color: #7c3aed !important;
}

/* ── 17. تحديد النص ── */
::selection {
  background: rgba(109, 40, 217, 0.18) !important;
  color: #1e0a3c !important;
}

/* ── 18. Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f3f4f6;
}

::-webkit-scrollbar-thumb {
  background: #6d28d9;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4f46e5;
}

/* ── 19. دائرة عداد السلة ── */
.absolute.flex.items-center.justify-center.-top-1.-right-1 {
  background: #dc2626 !important;
}

/* ── 20. hover على نتائج البحث ── */
.py-2.hover\:bg-gray-50 {
  font-family: 'Cairo', sans-serif !important;
}

.py-2.hover\:bg-gray-50:hover {
  background: #f5f3ff !important;
  color: #6d28d9 !important;
}
