/* ================================
   🌟 تصميم متجر Aura X
   ================================ */

/* Reset أساسي */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Cairo", sans-serif;
}

body {
  background: #f9fafb; /* خلفية فاتحة */
  color: #222;
  line-height: 1.6;
}

/* ================================
   🔹 الهيدر
   ================================ */
header {
  background: linear-gradient(135deg, #6366f1, #8b5cf6); /* تدرج بنفسجي/أزرق */
  color: #fff;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header h1 {
  font-size: 1.6rem;
  font-weight: 700;
}

nav {
  display: flex;
  align-items: center;
  gap: 15px;
}

nav a, 
nav button, 
#cart-icon {
  background: #fff;
  color: #4f46e5;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: 0.2s ease-in-out;
  text-decoration: none;
}

nav a:hover, 
nav button:hover, 
#cart-icon:hover {
  background: #ede9fe;
  transform: scale(1.05);
}

/* ================================
   🔹 البحث والفلترة
   ================================ */
.filters {
  margin: 20px auto;
  max-width: 1000px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.filters input[type="text"] {
  flex: 1;
  min-width: 220px;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-size: 1rem;
}

.filters select {
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
}

/* ================================
   🔹 المنتجات
   ================================ */
.products-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.product-card {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.product-info {
  padding: 15px;
  flex: 1;
}

.product-info h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.product-info p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 10px;
}

.product-info .price {
  font-weight: bold;
  color: #4f46e5;
  margin-bottom: 10px;
}

.product-info button {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: #4f46e5;
  color: #fff;
  font-weight: 600;
  transition: 0.2s;
}

.product-info button:hover {
  background: #4338ca;
}

/* ================================
   🔹 المودالات (السلة + الطلبات)
   ================================ */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 15px;
  max-width: 600px;
  width: 90%;
  padding: 20px;
  max-height: 90vh;
  overflow-y: auto;
}

/* ================================
   🔹 Toast إشعار
   ================================ */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #4f46e5;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 3000;
}

.toast.show {
  opacity: 1;
}

/* ================================
   🔹 الفوتر
   ================================ */
footer {
  background: #f3f4f6;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  font-size: 0.9rem;
  color: #555;
}

/* ================================
   🔹
/* صور المنتجات في السلة */
#cart-items-list .cart-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  margin-left: 6px;
}

/* صور المنتجات في الطلبات */
#orders-list .order-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  margin-left: 6px;
}
 /* قائمة الطلبات */
.order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9fafb;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px 15px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.order-row:hover {
  background: #f3f4f6;
}

.order-row span {
  font-size: 14px;
  color: #333;
}

/* تفاصيل الطلب */
.order-details {
  display: none;
  margin-top: 10px;
  padding: 10px;
  border-top: 1px solid #ddd;
}

.order-details.active {
  display: block;
}

.order-details .order-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.order-details .order-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}
