/* ================================================================
   1. الإعدادات العامة والمتغيرات
   ================================================================ */
   @import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&display=swap');

   :root {
       --gold: #c5a059;
       --gold-matte: #c5a059;
       --dark: #05241d;
       --light-dark: #08362c;
       --emerald-deep: #05241d;
       --white: #ffffff;
       --gray: #b0b0b0;
       --shadow: 0 15px 35px rgba(0,0,0,0.2);
       --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
   }
   
   * {
       box-sizing: border-box;
       margin: 0;
       padding: 0;
   }
   
   body {
       background: var(--dark);
       color: var(--white);
       font-family: 'Cairo', sans-serif;
       overflow-x: hidden;
       line-height: 1.7;
       direction: rtl;
   }
   
   /* ================================================================
      2. ناف بار متكامل (Navbar)
      ================================================================ */
   /* --- التنسيق الأساسي للناف بار --- */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 2000;
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 5%; background: rgba(5, 36, 29, 0.98);
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

/* توزيع الأقسام بالتساوي */
.nav-social, .nav-actions, .nav-links, .logo {
    flex: 1;
    display: flex;
    align-items: center;
}

/* السوشيال ميديا */
.nav-social { justify-content: flex-start; gap: 15px; }
.nav-social a { color: var(--gold-matte); font-size: 1.1rem; transition: 0.3s; }
.nav-social a:hover { opacity: 0.7; }

/* الأكشن (حساب وسلة) */
.nav-actions { justify-content: flex-start; gap: 20px; margin-left: 20px; }
.nav-icon, .cart-trigger { color: var(--gold-matte); font-size: 1.2rem; cursor: pointer; text-decoration: none; position: relative; }
.cart-badge {
    position: absolute; top: -8px; right: -12px; background: var(--gold-matte);
    color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 50%;
}

/* الروابط (توسيط كامل) */
.nav-links { justify-content: space-between; list-style: none; gap: 25px; }
.nav-links a { color: #fff; text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: 0.3s; }
.nav-links a.active { color: var(--gold-matte); border-bottom: 2px solid var(--gold-matte); }

/* اللوجو */
.logo { justify-content: flex-end; }
.logo img { height: 40px; }

/* --- الموبايل (Responsive) --- */
@media (max-width: 992px) {
    .nav-links {
        position: fixed; right: -100%; top: 0; width: 75%; height: 100vh;
        background: var(--emerald-deep); flex-direction: column; 
        justify-content: center; align-items: center; transition: 0.5s;
    }
    .nav-links.active { right: 0; }

    .menu-toggle {
        display: flex;
         flex-direction: column;
          gap: 6px; 
          cursor: pointer;
        order: 2;
         margin: 0 15px;
         width: 25px;
         z-index: 99;
    }
    .menu-toggle .bar{
    background-color: var(--gold-matte);
    height: 2px;
    width: 25px;
    }
    
    .nav-social { display: none; } /* إخفاء السوشيال في الموبايل لتوفير مساحة أو نقلها داخل المنيو */
    .nav-actions { order: 1; flex: 1; }
    .logo { order: 3; flex: 1; }
}

/* تحول الهامبرغر لـ X */
.menu-toggle.is-active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg);
     -webkit-transform: translateY(9px) rotate(45deg);
      -moz-transform: translateY(9px) rotate(45deg);
       -ms-transform: translateY(9px) rotate(45deg);
        -o-transform: translateY(9px) rotate(45deg);
    background-color: red !important;
    }
.menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg);
     -webkit-transform: translateY(-9px) rotate(-45deg);
      -moz-transform: translateY(-9px) rotate(-45deg);
       -ms-transform: translateY(-9px) rotate(-45deg);
        -o-transform: translateY(-9px) rotate(-45deg);
        background-color: red !important;
    
    }
/* Keyframes */
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInScale { to { opacity: 1; transform: scale(1); } }

.scroll-down { position: absolute; bottom: 30px; color: var(--gold-matte); font-size: 2rem; animation: bounce 2s infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
   
   /* ================================================================
      3. تفاصيل المنتج (Main Content)
      ================================================================ */
   .product-wrapper { margin-top: 100px; padding: 60px 5%; }
   .product-grid { 
       display: grid; 
       grid-template-columns: 1.1fr 0.9fr; 
       gap: 50px; 
       max-width: 1300px; 
       margin: auto; 
   }
   
   /* معرض الصور */
   .main-stage-wrapper {
       position: relative;
       height: 600px;
       border-radius: 20px;
       overflow: hidden;
       background: #000;
       border: 1px solid rgba(197, 160, 89, 0.1);
   }
   .main-stage-wrapper img { 
       width: 100%; height: 100%; object-fit: contain; transition: 0.5s; 
   }
   
   .thumbnails-slider {
       display: flex;
       gap: 15px;
       margin-top: 20px;
       overflow-x: auto;
       padding: 10px 0;
       scrollbar-width: none;
   }
   .thumb {
       width: 85px; height: 110px;
       border-radius: 12px;
       object-fit: cover;
       cursor: pointer;
       opacity: 0.6;
       border: 2px solid transparent;
       transition: 0.3s;
       flex-shrink: 0;
   }
   .thumb.active { opacity: 1; border-color: var(--gold); transform: scale(1.05); }
   
   /* نصوص التفاصيل */
   .breadcrumb { font-size: 0.9rem; color: var(--gold); margin-bottom: 20px; }
   .breadcrumb a { color: var(--gray); text-decoration: none; }
   .p-name { font-size: 3rem; margin-bottom: 15px; font-weight: 800; color: #fff; }
   
   .p-meta { display: flex; align-items: center; gap: 30px; margin-bottom: 30px; }
   .p-price-tag .amount { font-size: 2.8rem; font-weight: 700; color: var(--gold); }
   .p-status { 
       background: rgba(68, 189, 50, 0.1); 
       color: #44bd32; 
       padding: 6px 15px; 
       border-radius: 30px; 
       font-size: 0.85rem; 
   }
   
   .p-description h3 { color: var(--gold); margin-bottom: 15px; font-size: 1.2rem; }
   .p-description p { color: #d1d1d1; line-height: 1.8; }
   
   .p-actions { display: flex; gap: 15px; margin: 40px 0; }
   .add-to-cart-btn {
       flex: 1;
       background: var(--gold);
       color: var(--dark);
       padding: 20px;
       border-radius: 15px;
       border: none;
       font-weight: 800;
       font-size: 1.1rem;
       cursor: pointer;
       display: flex;
       align-items: center;
       justify-content: center;
       gap: 12px;
       transition: 0.3s;
   }
   .add-to-cart-btn:hover { background: #d4b577; transform: translateY(-3px); }
   
   .fav-btn {
       width: 65px;
       background: transparent;
       border: 1px solid var(--gold);
       color: var(--gold);
       border-radius: 15px;
       font-size: 1.4rem;
       cursor: pointer;
       transition: 0.3s;
   }
   .fav-btn:hover { background: var(--gold); color: var(--dark); }
   
   .guarantee-box {
       display: grid;
       grid-template-columns: repeat(3, 1fr);
       gap: 15px;
       padding-top: 30px;
       border-top: 1px solid rgba(255,255,255,0.05);
   }
   .g-item { text-align: center; color: var(--gray); font-size: 0.8rem; }
   .g-item i { display: block; font-size: 1.5rem; color: var(--gold); margin-bottom: 8px; }
   
   /* ================================================================
      4. المقترحات (Related Products)
      ================================================================ */
   .related-section { padding: 80px 5%; background: rgba(0,0,0,0.2); }
   .section-head { text-align: center; margin-bottom: 50px; }
   .section-head h2 { font-size: 2.2rem; color: var(--gold); margin-bottom: 10px; }
   
   .cards-grid {
       display: grid;
       grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
       gap: 30px;
       max-width: 1300px;
       margin: auto;
   }
   .s-card {
       background: var(--light-dark);
       border-radius: 20px;
       padding: 15px;
       text-align: center;
       transition: 0.4s;
       border: 1px solid transparent;
   }
   .s-card:hover { transform: translateY(-10px); border-color: var(--gold); }
   .s-img-box { width: 100%; height: 350px; border-radius: 15px; overflow: hidden; margin-bottom: 15px; }
   .s-img-box img { width: 100%; height: 100%; object-fit: cover; }
   .s-price { display: block; color: var(--gold); font-weight: bold; margin: 10px 0; }
   .s-btn {
       width: 100%;
       padding: 12px;
       background: transparent;
       border: 1px solid var(--gold);
       color: var(--gold);
       border-radius: 10px;
       cursor: pointer;
       transition: 0.3s;
   }
   .s-btn:hover { background: var(--gold); color: var(--dark); }
   
   /* ================================================================
      5. السلة المنبثقة (Cart Popdown)
      ================================================================ */
      .wishlist-btn.active i { color: #e74c3c !important; }
      .cart-popdown {
          position: fixed; top: 80px; right: 5%; width: 300px; background: #fff;
          box-shadow: 0 10px 40px rgba(0,0,0,0.15); border-radius: 8px; opacity: 0; visibility: hidden;
          transform: translateY(-10px); transition: 0.3s ease; z-index: 9999; padding: 15px; border-top: 3px solid #c5a059;
      }
      .cart-popdown.show { opacity: 1; visibility: visible; transform: translateY(0); }
      .cart-items-container { max-height: 350px; overflow-y: auto; padding-right: 5px; }
      .cart-item-mini { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; border-bottom: 1px solid #f2f2f2; padding-bottom: 10px; }
      .cart-img-wrapper { width: 45px; height: 60px; overflow: hidden; border-radius: 4px; flex-shrink: 0; }
      .cart-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
      .item-info { flex: 1; text-align: right; }
      .item-info h6 { font-size: 0.8rem; margin: 0; color: #05241d; }
      .mini-price { font-size: 0.75rem; color: #c5a059; font-weight: bold; }
      .remove-item { background: none; border: none; color: #ffbcbc; cursor: pointer; font-size: 1rem; transition: 0.2s; }
      .remove-item:hover { color: #ff4d4d; }
      .whatsapp-send-btn { width: 100%; padding: 12px; background: #25d366; color: #fff; border: none; border-radius: 5px; cursor: pointer; font-family: 'Cairo'; font-weight: bold; margin-top: 10px; }
      #notification-container { position: fixed; bottom: 20px; right: 20px; z-index: 10001; }
      .add-success-popup {
          background: #fff; border-right: 3px solid #c5a059; display: flex; align-items: center; gap: 12px; 
          padding: 8px 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-radius: 4px; margin-top: 8px;
          animation: slideIn 0.4s ease forwards; direction: rtl;
      }
      .add-success-popup img { width: 35px; height: 45px; object-fit: cover; }
      @keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
      .fade-out { opacity: 0; transition: 0.5s; }
   /* ================================================================
      6. الفوتر (Footer)
      ================================================================ */
  /* ================================================================
   SECTION: FOOTER (جنان لوكشري)
   ================================================================ */
   .main-footer {
    background: #05241d; /* لون جنان الأخضر الملكي الداكن */
    color: #ffffff;
    padding: 80px 5% 30px;
    border-top: 2px solid #c5a059; /* الخط الذهبي العلوي */
    position: relative;
    overflow: hidden;
}

/* حاوية الفوتر الرئيسية */
.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;

}

/* 1. قسم العلامة التجارية (Brand) */
.footer-brand .footer-logo {
    width: 100%; /* ضبط العرض ليكون متناسقاً */
    margin-bottom: 20px;
    filter: brightness(1.1);
}

.footer-brand p {
    color: #b0b0b0;
    line-height: 1.8;
    margin-bottom: 25px;
    font-size: 0.95rem;
    max-width: 350px;
}

/* أيقونات التواصل الاجتماعي */
.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(197, 160, 89, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #c5a059;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(197, 160, 89, 0.2);
}

.social-links a:hover {
    background: #c5a059;
    color: #05241d;
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.2);
}

/* 2. قسم الروابط السريعة (Links) */
.footer-links h3, 
.footer-contact h3 {
    color: #c5a059;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
}

/* إضافة خط صغير تحت العناوين لمظهر فخم */
.footer-links h3::after, 
.footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 40px;
    height: 2px;
    background: #c5a059;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 15px;
}

.footer-links ul li a {
    color: #b0b0b0;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links ul li a:hover {
    color: #ffffff;
    transform: translateX(-10px); /* حركة لليسار (RTL) عند التمرير */
}

/* 3. قسم معلومات التواصل (Contact) */
.footer-contact p {
    color: #b0b0b0;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    direction: ltr; /* لضمان ظهور أرقام الهواتف بشكل صحيح */
    justify-content: flex-end; /* لمحاذاة النص المقلوب مع الـ RTL */
}

.footer-contact i {
    color: #c5a059;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* 4. الجزء السفلي (Copyright) */
.footer-bottom {
    margin-top: 70px;
    text-align: center;
}

.gold-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, 
        transparent, 
        rgba(197, 160, 89, 0.4), 
        transparent);
    margin-bottom: 25px;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: #888888;
    letter-spacing: 0.5px;
}

/* ================================================================
   RESPONSIVE DESIGN (Media Queries)
   ================================================================ */
@media (max-width: 968px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }

    .footer-brand p {
        margin: 0 auto 25px;
    }

    .social-links {
        justify-content: center;
    }

    .footer-contact p {
        justify-content: center;
    }

    .footer-links h3::after, 
    .footer-contact h3::after {
        right: 50%;
        transform: translateX(50%); /* محاذاة الخط للوسط في الجوال */
    }

    .footer-links ul li a:hover {
        transform: translateY(-3px); /* تغيير الحركة في الجوال */
    }
}


   /* ================================================================
      7. الاستجابة (Responsive Design)
      ================================================================ */
   @media (max-width: 992px) {
       .navbar { padding: 10px 5%; }
       .nav-links {
           position: fixed; right: -100%; top: 0; width: 80%; height: 100vh;
           background: var(--dark); flex-direction: column; justify-content: center;
           transition: 0.5s; box-shadow: -10px 0 30px rgba(0,0,0,0.5);
       }
       .nav-links.active { right: 0; }
       .menu-toggle { display: flex; flex-direction: column; gap: 5px; cursor: pointer; order: 3; }
       .menu-toggle .bar { width: 25px; height: 3px; background: var(--gold); }
       
       .product-grid { grid-template-columns: 1fr; }
       .main-stage-wrapper { height: 450px; }
       .p-name { font-size: 2.2rem; }
       .nav-social { display: none; }
       .logo { justify-content: center; flex: 2; }
   }
   
   @media (max-width: 600px) {
       .product-wrapper { padding: 30px 5%; }
       .main-stage-wrapper { height: 350px; }
       .p-actions { flex-direction: column; }
       .add-to-cart-btn { padding: 15px; }
       .footer-container { grid-template-columns: 1fr; text-align: center; }
       .social-links { justify-content: center; }
       .cart-popdown { width: 90%; left: 5%; }
   }
   
   /* توست الإضافة بنجاح */
   .add-success-popup {
       position: fixed; bottom: 30px; right: 30px;
       background: #fff; color: #333;
       padding: 15px 25px; border-radius: 10px;
       display: flex; align-items: center; gap: 15px;
       box-shadow: 0 10px 30px rgba(0,0,0,0.2);
       border-right: 5px solid var(--gold);
       z-index: 5000;
       animation: slideIn 0.5s forwards;
   }
   @keyframes slideIn {
       from { transform: translateX(120%); }
       to { transform: translateX(0); }
   }
   .add-success-popup img { width: 40px; height: 55px; object-fit: cover; border-radius: 4px; }