/* ==========================================================
   🌿 Pastura Safe Layer Control – v1.0
   File purpose: control only z-index and position layering
   without altering visual placement or disabling buttons.
   ========================================================== */

/* === قاعدة عامة === */
body.home-page.index-page {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 0;          /* قاعدة الأساس */
}

/* === الحاوية الخلفية === */
.bg-container {
  position: relative;
  z-index: 100;        /* خلف المحتوى */
}

/* === الصور العائمة === */
.floating-images,
.mobile-floating-images {
  position: absolute;
  inset: 0;
  pointer-events: none;  /* تمرر النقرات */
  overflow: hidden;
  z-index: 150;          /* تحت المحتوى */
}

/* الصور نفسها */
.floating-img {
  position: absolute;
  z-index: 155;
  pointer-events: none;
}

/* === المحتوى الرئيسي === */
.main {
  position: relative;
  z-index: 300;         /* فوق الصور */
}

/* === شريط التنقل === */
.main-nav,
.home-navbar,
#main-nav {
  position: relative;
  z-index: 1000;        /* دائمًا فوق */
 
}

/* عناصر داخل الـ navbar */
.nav-container,
.nav-right,
.nav-links,
.dropdown-menu,
.dropdown-toggle {
  position: relative;

}


/* === زر What is Pastura و الأزرار العامة === */
.nav-button,
.pastura-btn,
.shopnow-dropdown,
.shopnow-button {
  position: relative;
       /* فوق الصور والعناصر غير التفاعلية */
  pointer-events: auto; /* يضمن عمل الأزرار */
}

/* === منطقة المصادقة (Sign In / Out) === */
.pst-auth-area,
.pst-btn-auth,
#signout-btn
 {
  position: relative;
  z-index: 1040;
  pointer-events: auto;
}

/* === قاعدة أمان نهائية === */
button,
a,
.dropdown,
.shopnow-dropdown,
.nav-button {
  pointer-events: auto !important; /* لا تُعطَّل أبداً */
  z-index: 1020 !important;        /* فوق كل الطبقات الشفافة */
}
/* --- Fix: Allow top floating image (pic1) to appear above navbar --- */
/* --- Fix Stack Context for top floating image (pic1) --- */
.img1 {
  position: fixed !important;        /* تفصلها عن سياق .bg-container */
  top: var(--mv-y, 0);               /* تحافظ على موقعها النسبي */
  left: var(--mv-x, 0);
  transform: translate(var(--mv-x, 0), var(--mv-y, 0));
  z-index: 1100 !important;          /* فوق الـ navbar فعلياً */
  pointer-events: none !important;   /* تمرر النقرات للأزرار */
}

/* =====================================================
   🧭 Navbar Dropdown Priority Fix
   Ensures dropdown menus always appear above Shop Now
   ===================================================== */

.main-nav,
.home-navbar,
#main-nav {
  position: relative;
  z-index: 2000; /* إنشاء سياق جديد أعلى من Shop Now */
}

.nav-container,
.nav-right,
.nav-links,
.dropdown,
.dropdown-menu,
.dropdown-toggle {
  position: relative;
  z-index: 2100 !important; /* فوق كل الأزرار */
}

/* خصيصاً لقائمة المنتجات والسياسات */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 2150 !important;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
}

/* Shop Now button stays below dropdowns */
.shopnow-dropdown,
.shopnow-button {
  position: relative;
  z-index: 1500 !important; /* أدنى من القوائم */
}
