

/* ==== الشريط العلوي والقائمة المنسدلة ==== */
.top-bar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:7px 20px;
  background:linear-gradient(90deg, #272525, #6c00af, #c54200, #c40000, #0705b5, #c42708, #740496, #373535);
  color:white;
  font-size:15px;
}
.top-bar a { color:white; text-decoration:none; margin:0 8px; padding:6px 12px; border-radius:8px; font-weight:bold; }
.top-bar a:hover { background:rgba(255,255,255,0.2); }


/* زر العودة */
.back-btn { display:inline-block; margin:10px 0; padding:6px 12px; border-radius:6px; background:#6c5ce7; color:white; text-decoration:none; transition:0.3s; }
.back-btn:hover { background:#5746c8; }

/* زر العودة الرئيسي */
.back-btn {
  display: inline-block;
  padding: 8px 12px;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #6c5ce7, #00ffff);
  border-radius: 12px;
  box-shadow: 0 0 10px #6c5ce7, 0 0 20px #00ffff inset;
  transition: all 0.3s ease-in-out;
  position: relative;
  overflow: hidden;
}

/* تأثير حركة الألوان عند المرور */
.back-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, rgba(255,255,255,0.3), rgba(255,255,255,0));
  transform: rotate(45deg);
  transition: all 0.5s ease-in-out;
}

.back-btn:hover::before {
  top: 0;
  left: 0;
}

/* تأثير الزر عند Hover */
.back-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 15px #6c5ce7, 0 0 30px #00ffff inset;
}

/* تأثير الضغط على الزر */
.back-btn:active {
  transform: scale(0.95);
  box-shadow: 0 0 8px #6c5ce7, 0 0 15px #00ffff inset;
  transition: all 0.1s ease-in-out;
}


/* =========================================
   🖥️ BACKGROUND - خلفية الصفحة المتحركة
========================================= */
body {
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  direction: rtl;
  background: #000;
  /* احتياطي */
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-width: none;
}

html {
  scrollbar-width: none;
}

body::-webkit-scrollbar {
  display: none;
}

/* طبقة الخلفية المتحركة */
html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: 'Arial', sans-serif;
  direction: rtl;
  overflow-x: hidden;
  background: transparent;
  /* مهم جدًا */
}

/* =========================================
   🎨 BACKGROUND FIXED LAYER (Mobile Safe)
========================================= */
.bg-animated {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;

  background: linear-gradient(135deg,
      #3a3a3a,
      #a6bddaf8,
      #2805ee,
      #0373f3f8,
      #e86508fe,
      #f07528,
      #d12a18,
      #eed705);
  background-size: 400% 400%;
  animation: bg 18s linear infinite;

  transform: translate3d(0, 0, 0);
  /* يحفز GPU */
  backface-visibility: hidden;
  /* يحسن الأداء على الهواتف */
  will-change: transform, background-position;
  pointer-events: none;
}

/* الحركة */
@keyframes bg {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }

}


/* ================== الشريط العلوي مع أزرار متوهجة ================== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 15px;
  background: linear-gradient(120deg, #272525, #6c00af, #c54200, #c40000, #0705b5, #c42708, #740496, #373535);
  border-bottom: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.top-bar a {
  color: #fff;
  text-decoration: none;
  margin: 0 10px;
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: bold;
  transition: all 0.3s ease;
  background: rgba(255,255,255,0.1);
}

.top-bar a:hover {
  background: linear-gradient(120deg, #0916d4, #b70000, #6c16d4);
  box-shadow: 0 0 12px #ce0000, 0 0 20px #012da8 inset;
  transform: scale(1.1);
}


/* ================== عنوان الفئة ================== */
.category-title {
  text-align: center;
  margin: 25px 0;
  font-size: 2.2rem;
  text-shadow: 2px 2px 8px #000;
}


/* =====================================================
   🛍️ شبكة عرض المنتجات (Products Grid)
===================================================== */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));

  column-gap: 18px;
  /* المسافة بين الكروت أفقياً */
  row-gap: 35px;
  /* ✅ المسافة بين كل 8 منتجات واللي تحتهم */

  padding: 16px;
}


/* =====================================================
   🧱 كارت المنتج (Product Card)
===================================================== */
.product {
  display: flex;
  flex-direction: column;

  height: 100%;
  padding: 10px;

  border-radius: 16px;
  background: rgba(255, 255, 255, 0.611); /* تأثير شمعي */
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.4);

  text-align: center;
  transition: 0.3s ease;
}


/* =====================================================
   ✨ تأثير التحويم
===================================================== */
.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}


/* =====================================================
   🖼️ صورة المنتج
===================================================== */
.product img {
  width: 100%;
  height: 150px;          /* تحكم ثابت في حجم الكارت */
  object-fit: contain;    /* الصورة لا تكسر التنسيق */
  border-radius: 12px;
  background: rgba(255,255,255,0.6);
}


/* =====================================================
   🛍️ اسم المنتج
===================================================== */
.product h3 {
  margin: 8px 0 4px;
  font-size: 14px;
  color: #222;
}


/* =====================================================
   💰 السعر
===================================================== */
.product p.price {
  margin: 4px 0 8px;
  font-weight: bold;
  color: #0a7a32;
  font-size: 14px;
}


/* =====================================================
   ➕ زر إضافة إلى السلة (ثابت في الأسفل)
===================================================== */
.add-to-cart-form {
  margin-top: auto;       /* 🔒 يثبت الزر في أسفل الكارت */
}

.add-to-cart-form button {
  width: 100%;
  padding: 9px;
  background: linear-gradient(120deg, #1102b1, #cd0000);
  color: white;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: 0.3s;
}

.add-to-cart-form button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 14px rgba(0,0,0,0.25);
}



/* ================== شريط السلة وزر الهامبرغر ================== */
.cart-menu-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cart-button {
  background: linear-gradient(120deg, #ffffff, #000000)!important;
  color: #333;
  border: none;
  padding: 4px 12px!important;
    top: -1.2px;
  left: 5px;
  border-radius: 25px;
  font-weight: bold;
  position: relative;
  box-shadow: 4px 4px 12px #000000, -4px -4px 12px #dbdcfbce;
  transition: all 0.2s ease-in-out;
}

.cart-button:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 15px #aaaaaa, -6px -6px 15px #fff;
}

.cart-count {
  background: red;
  color: white;
  border-radius: 50%;
  padding: 2px 5px;
  font-size: 10.5px;
  font-weight: bold;
  position: absolute;
  top: -5px;
  left: -8px;
}



/* =====================================================
   ☰ زر القائمة (Hamburger)
===================================================== */
.menu-btn {
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #66036dff;
  color: #fff;
  border: none;
  cursor: pointer;
}


/* =====================================================
   📂 القائمة المنسدلة (Dropdown Menu)
===================================================== */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 50px;
  left: 10px;
  background: #1c1f3a;
  color: white;
  width: 142px;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  z-index: 1050;
}

.dropdown-menu h2 {
  margin-bottom: 10px;
  font-size: 16px;
  color: #6c5ce7;
  text-align: center;
}

.dropdown-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dropdown-menu li a {
  display: block;
  padding: 8px;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: 0.3s;
}

.dropdown-menu li a:hover {
  background: linear-gradient(145deg, #6c5ce7, #00ffff);
  transform: scale(1.05);
}