/* ============================================================
   WOD DESIGN SYSTEM – النظام الأساسي لتصميم المواقع
   الموقع: متجر متعدد البائعين (ورد وهدايا)
   المصمم: محمد
   متوافق مع RTL & LTR
============================================================ */

/* ----------------------------------
   1. المتغيرات الأساسية – Colors & Font
----------------------------------- */
:root {
  --primary-color: #EF2D2D;
  --secondary-color: #FFFFFF;
  --background-light: #FFF4F4;
  --text-dark: #333333;
  --accent-color: #D81B60;

  --font-main: 'Almarai', sans-serif;
}

/* ----------------------------------
   2. إعدادات عامة للموقع – General Reset
----------------------------------- */
body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background-color: var(--background-light);
  font-size: 16px;
  line-height: 1.8;
  direction: rtl;
  margin: 0;
  padding: 0;
}
/* ✅ فرض خط Almarai على كل العناصر الأساسية */
h1, h2, h3, h4, h5, h6,
p, a, button,
.button-primary, .button-outline,
.card-title, .card-text,
.site-logo, .main-nav a,
input, textarea, select {
  font-family: var(--font-main) !important;
}


h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  color: var(--primary-color);
  margin-bottom: 0.6em;
  line-height: 1.4;
}

p {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 1em;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: 0.3s ease;
}

a:hover {
  color: var(--accent-color);
}

/* ----------------------------------
   3. خلفيات الأقسام – Section Backgrounds
----------------------------------- */
.section-light {
  background-color: var(--background-light);
}

.section-primary {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

.text-center {
  text-align: center;
}

/* ----------------------------------
   4. الأزرار – Buttons
----------------------------------- */
.button-primary {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-family: var(--font-main);
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: inline-block;
  text-align: center;
}

.button-primary:hover {
  background-color: var(--accent-color);
  color: #fff;
}

.button-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.button-outline:hover {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

/* ----------------------------------
   5. البطاقات – Cards
----------------------------------- */
.card {
  background-color: var(--secondary-color);
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(239, 45, 45, 0.1);
  border: 1px solid var(--primary-color);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin: 12px 0 8px;
  color: var(--primary-color);
}

.card-text {
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.card-footer {
  margin-top: auto;
}

/* ----------------------------------
   6. صور داخل البطاقات – Card Images
----------------------------------- */
.card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.card img:hover {
  transform: scale(1.05);
}

/* ----------------------------------
   7. نظام الشبكة – Responsive Grid System
----------------------------------- */
.card-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1400px) {
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ----------------------------------
   8. الهيدر والقائمة – Header & Navigation
----------------------------------- */
.site-header {
  background-color: var(--secondary-color);
  padding: 15px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-color);
  font-family: var(--font-main);
  text-decoration: none;
}

.main-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.main-nav a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
  transition: color 0.3s ease;
  position: relative;
}

.main-nav a:hover {
  color: var(--primary-color);
}

.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--primary-color);
}

/* Responsive Menu – for Mobile */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    flex-direction: column;
    gap: 10px;
    background-color: var(--secondary-color);
    position: absolute;
    top: 60px;
    right: 15px;
    width: 85%;
    padding: 20px;
    border: 1px solid #eee;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  }

  .main-nav.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}

/* ----------------------------------
   9. دعم RTL و LTR تلقائيًا
----------------------------------- */
html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

html[dir="ltr"] body {
  direction: ltr;
  text-align: left;
}
/* ----------------------------------
   10. تأثير الظهور عند التمرير – Fade In on Scroll
----------------------------------- */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}

.fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
