/* إعداد الخط */
body {
  font-family: "Cairo", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f7fdf7;
  direction: rtl;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header {
  background-color: #5e35b1;
  padding: 15px 0;
  color: white;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: center;
}

.logo img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.store-name {
  font-size: 1.5rem;
  font-weight: 700;
}

.nav-bar ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
  justify-content: center;
}

.nav-bar ul li a {
  text-decoration: none;
  color: white;
  font-size: large;
  font-weight: 600;
  transition: color 0.3s ease;
}

.nav-bar ul li a:hover {
  color: #aed581; /* لون أخضر فاتح عند المرور */
}

/* قسم الترحيب يملأ الشاشة */
.welcome-section {
  height: 100vh; /* ارتفاع الشاشة كاملة */
  background: linear-gradient(135deg, #7e57c2, #512da8);
  color: white;
  display: flex;
  justify-content: center; /* توسيط أفقي */
  align-items: center; /* توسيط عمودي */
  text-align: center;
  font-weight: 600;
  overflow: hidden;
  flex-direction: column;
  padding: 20px;
  opacity: 0; /* البداية شفافية 0 */
  transform: translateY(30px); /* بداية متحرك للأسفل */
  animation: fadeSlideIn 1s forwards ease-out; /* تطبيق الحركة */
}

.welcome-section .container {
  max-width: 700px;
}

/* نص العنوان */
.welcome-section h1 {
  font-size: 3rem;
  margin-bottom: 15px;
}

/* نص الفقرة */
.welcome-section p {
  font-size: 1.5rem;
  line-height: 1.5;
}

/* حركة الدخول */
@keyframes fadeSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* استجابة الجوال */
@media (max-width: 900px) {
  .products-container {
    flex-direction: column;
  }

  .products-categories {
    width: 100%;
    margin-bottom: 30px;
  }

  .products-content {
    width: 100%;
    min-height: 300px;
  }
}

.about-section {
  background-color: #ffffff;
  padding: 80px 20px;
  direction: rtl;
}

.about-title {
  text-align: center;
  font-size: 2.8rem;
  color: #2e7d32;
  margin-bottom: 30px;
  font-weight: 700;
}

.about-intro {
  text-align: center;
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #444;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 50px;
}

.feature {
  background: #f5faf5;
  border: 1px solid #d0e5d2;
  padding: 20px;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.feature:hover {
  transform: translateY(-5px);
}

.feature h3 {
  color: #2e7d32;
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.feature p {
  color: #555;
  font-size: 1rem;
  line-height: 1.6;
}

/* إحصائيات */
.about-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
}

.stat-box {
  background-color: #2e7d32;
  color: white;
  padding: 30px 20px;
  border-radius: 12px;
  width: 230px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-box span {
  font-size: 1.8rem;
  font-weight: bold;
  display: block;
  margin-bottom: 10px;
}

.stat-box p {
  font-size: 1rem;
  margin: 0;
}

/* الفقرة الختامية */
.about-footer {
  text-align: center;
  font-size: 1.2rem;
  color: #2e7d32;
  font-weight: 600;
  margin-top: 20px;
}

.footer {
  background-color: #2e7d32;
  color: white;
  padding: 60px 20px 20px;
  direction: rtl;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-section {
  flex: 1 1 250px;
}

.footer-section h3 {
  font-size: 1.4rem;
  color: white;
  margin-bottom: 15px;
  border-bottom: 2px solid #ffffff55;
  padding-bottom: 5px;
}

.footer-section p,
.footer-section a {
  font-size: 1rem;
  color: white;
}

.footer-section a {
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #ffffff;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.social-icons a {
  color: white;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.social-icons a:hover {
  transform: scale(1.2);
}

/* روابط سريعة */
.quick-links {
  list-style: none;
  margin: 0;
  padding: 0;
  color: white;
}

/* أسفل الفوتر */
.footer-bottom {
  text-align: center;
  margin-top: 40px;
  font-size: 0.95rem;
  color: white;
  border-top: 1px solid #ffffff33;
  padding-top: 15px;
}

/* شبكة عرض المنتجات */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  width: 100%;
}

/* بطاقة المنتج */
.product-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: transform 0.3s ease;
  padding-bottom: 15px;
}

.product-card:hover {
  transform: translateY(-5px);
}

/* صورة المنتج */
.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* اسم المنتج */
.product-card h3 {
  font-size: 1.1rem;
  margin: 15px 0 10px;
  color: #2e7d32;
  padding: 0 10px;
}

/* الأسعار */
.product-card .price {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.new-price {
  font-weight: bold;
  color: #e53935;
  font-size: 1.1rem;
}

.old-price {
  color: #999;
  text-decoration: line-through;
  font-size: 0.95rem;
}

/* شارة التخفيض */
.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #e53935;
  color: white;
  padding: 4px 10px;
  font-size: 0.85rem;
  border-radius: 6px;
  font-weight: 600;
}

/* تعديل نصوص الترحيب */
#welcome h1 {
  position: relative;
  top: -90px;
}

#welcome p {
  position: relative;
  top: -80px;
}

ul li a {
  color: white;
  text-decoration: none;
  padding-bottom: 5px;
}

ul li a.active {
  border-bottom: 2px solid white;
}

/* استجابة الجوال لشبكة المنتجات */
@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr); /* عرض منتجان */
    gap: 20px;
  }
}

@media (max-width: 320px) {
  .products-grid {
    grid-template-columns: 1fr; /* عرض منتج واحد للشاشات الصغيرة جداً */
  }
}

/* قسم ترحيب ثانٍ */
.welcome-section-2 {
  background-color: #f7f9f7; /* خلفية فاتحة ونظيفة */
  color: #2e7d32; /* لون أخضر طبيعي للنص */
  padding: 90px 25px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-family: "Cairo", sans-serif;
  min-height: 280px;
  box-shadow: 0 8px 25px rgba(46, 125, 50, 0.15);
  border-radius: 25px;
  margin: 50px auto;
  max-width: 850px;
  transition: box-shadow 0.4s ease;
}

.welcome-section-2:hover {
  box-shadow: 0 12px 35px rgba(46, 125, 50, 0.3);
}

#welcome-2 {
  max-width: 720px;
  margin: 0 auto;
}

#welcome-2 h1 {
  font-size: 3.6rem;
  margin-bottom: 20px;
  font-weight: 900;
  letter-spacing: 1.2px;
  line-height: 1.1;
  text-shadow: 1px 1px 2px rgba(46, 125, 50, 0.3);
}

#welcome-2 p {
  font-size: 1.45rem;
  line-height: 1.8;
  color: #3b8e3b; /* أخضر أفتح للفقرة */
  font-weight: 600;
  text-shadow: 0 1px 1px rgba(46, 125, 50, 0.15);
}

/* إعداد عام قسم المنتجات */
.products-section {
  background-color: #e0f0ff; /* أزرق فاتح */
  padding: 60px 20px;
  direction: rtl;
  font-family: "Cairo", sans-serif;
}

.products-container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: auto;
  gap: 40px;
}

/* العنوان الرئيسي */
.section-title {
  width: 100%;
  text-align: center;
  font-size: 2.5rem;
  color: #034d82;
  margin-bottom: 40px;
}

/* قائمة الأقسام */
.products-categories {
  width: 250px;
  background-color: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.products-categories ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.products-categories li {
  margin-bottom: 15px;
}

.products-categories a {
  text-decoration: none;
  color: #034d82;
  font-weight: bold;
  transition: 0.3s;
  padding: 10px;
  display: block;
  border-radius: 8px;
}

.products-categories a.active,
.products-categories a:hover {
  background-color: #cde8ff;
  color: #000;
}

/* صندوق المنتجات */
.products-content {
  flex: 1;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
  animation: fadeIn 1s ease;
}

/* شبكة المنتجات */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 أعمدة متساوية العرض */
  gap: 25px;
}

/* بطاقة المنتج */
.product-card {
  display: block;
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  animation: slideUp 0.5s ease forwards;
  opacity: 0;
}

.product-card img {
  max-width: 100%;
  height: 180px;
  object-fit: contain;
  margin-bottom: 10px;
}

.product-card h3 {
  font-size: 1.1rem;
  color: #034d82;
  margin: 10px 0;
}

.price {
  color: #333;
  font-size: 1rem;
}

.new-price {
  font-weight: bold;
  color: #d62828;
  margin-left: 5px;
}

.old-price {
  text-decoration: line-through;
  color: gray;
  font-size: 0.9rem;
}

.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #d62828;
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
}

/* أنميشن */
@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  background-color: #f0f8ff; /* خلفية فاتحة عند المرور */
  cursor: pointer;
}

.product-card:hover h3 {
  color: #0077cc; /* لون أزرق أغمق للعنوان عند المرور */
}

h1 {
  font-family: "Cairo", sans-serif;
  font-weight: 700;
  color: white;
  text-align: center;
  margin: 20px 15px;
  font-size: 2.8rem;
  line-height: 1.2;
}

/* تنسيق متجاوب لشاشات الهاتف الصغيرة */
@media (max-width: 600px) {
  h1 {
    font-size: 2rem;
    margin: 15px 10px;
    padding: 0 5px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr); /* عرض منتجان */
    gap: 20px;
  }
}

@media (max-width: 320px) {
  .products-grid {
    grid-template-columns: 1fr; /* عرض منتج واحد للشاشات الصغيرة جداً */
  }
}

@media (max-width: 600px) {
  .products-categories {
    position: static; /* أو relative */
    top: auto;
    width: 100%; /* إذا تريد تأخذ عرض كامل الشاشة */
    margin-bottom: 20px; /* فاصلة أسفلها */
  }
}
