/* style.css */

/* تحديد الألوان الأساسية والمتغيرات */
:root {
  --primary-color: #6A057F; /* أرجواني غامق */
  --primary-light: #8E2DE2; /* أرجواني فاتح */
  --accent-color: #B5179E; /* بنفسجي فاقع */
  --secondary-color: #E6E6FA; /* بنفسجي فاتح (Lavender) */
  --text-color: #333333;
  --light-gray: #f8f8f8;
  --white: #FFFFFF;
}

/* التنسيقات العامة للصفحة */
body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--light-gray);
  color: var(--text-color);
  margin: 0;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

h1, h2, h3 {
  color: var(--primary-color);
  margin-top: 0;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-color);
}

/* تنسيق الشريط العلوي */
.top-bar {
  background: linear-gradient(to right, var(--primary-color), var(--primary-light));
  color: var(--white);
  padding: 10px 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9em;
}

.top-bar .user-actions a {
  color: var(--white);
  margin-right: 15px;
  opacity: 0.9;
}

.top-bar .user-actions a:hover {
  opacity: 1;
  color: var(--white);
}

/* تنسيق رأس الصفحة */
.main-header {
  background-color: var(--white);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index:40 ;
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* تنسيق الصورة الجديدة */
.logo-image {
  height: auto;
  transition: transform 0.3s ease;
}

.logo-image:hover {
  transform: scale(1.1);
}

/* إخفاء الأيقونة القديمة */
.logo-icon {
  display: none;
}

.logo-text h1, .logo-text p {
  margin: 0;
}

.logo-text h1 {
  font-size: 2rem;
}

.logo-text p {
  font-size: 0.9em;
  color: var(--text-color);
  opacity: 0.7;
}

.search-box {
  display: flex;
  flex-grow: 1;
  max-width: 500px;
}

.search-box input {
  width: 100%;
  padding: 8px 15px;
  border: 2px solid var(--secondary-color);
  border-radius: 50px 0 0 50px;
  font-size: 1em;
  outline: none;
  transition: all 0.3s ease;
}

.search-box input:focus {
  border-color: var(--primary-color);
}

.search-box button {
  padding: 12px 20px;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 0 50px 50px 0;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search-box button:hover {
  background-color: var(--accent-color);
}

.header-features {
  display: flex;
  gap: 20px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 0.9em;
  position: relative;
  transition: transform 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-3px);
  color: var(--accent-color);
}

.feature-item i {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.cart-count {
  position: absolute;
  top: -14px;
  right: -3px;
  background-color: red;
  color: var(--white);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2px 6px;
  font-size: 0.7em;
}
.main-nav {
  background-color: var(--secondary-color);
  display: flex;
  justify-content: space-between;
  border-radius: 50px;
  gap: 15px;
  padding: 4px
}
.main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.main-nav a {
  color: var(--primary-color);
  font-weight: bold;
  padding: 10px 15px;
  border-radius: 30px;
  transition: background-color 0.3s, color 0.3s;
}

.main-nav a:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* تنسيق المحتوى الرئيسي */
.main-content {
  padding: 40px 0;
}

/* قسم العروض الرئيسية */
.hero-section {
  background-color: var(--white);
  padding: 50px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.hero-banner {
  background: linear-gradient(to right, var(--primary-light), var(--accent-color));
  color: var(--white);
  padding: 40px;
  border-radius: 10px;
}

.hero-banner h2 {
  color: var(--white);
  font-size: 3em;
  margin-bottom: 10px;
}

.hero-banner p {
  font-size: 1.2em;
  opacity: 0.9;
}

.cta-button {
  background-color: var(--white);
  color: var(--primary-color);
  padding: 15px 30px;
  border-radius: 50px;
  font-weight: bold;
  margin-top: 20px;
  display: inline-block;
  transition: transform 0.3s ease, background-color 0.3s;
}

.cta-button:hover {
  transform: translateY(-3px);
  background-color: var(--secondary-color);
}

/* حذف التنسيقات الخاصة بالمخطط */
.chart-section, .chart-container {
  display: none;
}

/* حذف التنسيقات القديمة لبطاقات المنتجات */
.product-grid, .product-card {
  display: none;
}

/* قسم المزايا التنافسية */
.features-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.feature-card {
  background-color: var(--white);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card i {
  font-size: 2.5em;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.feature-card h3 {
  font-size: 1.2em;
}

.feature-card p {
  font-size: 0.9em;
}

/* قسم شركاء النجاح */
.partners-section {
  text-align: center;
  margin-bottom: 40px;
}

.partners-section h2 {
  margin-bottom: 25px;
}

.partners-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.partners-grid img {
  max-width: 150px;
  height: auto;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: filter 0.3s, opacity 0.3s;
}

.partners-grid img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* تنسيق تذييل الصفحة (Footer) */
.main-footer {
  background: linear-gradient(to right, var(--primary-color), var(--primary-light));
  color: var(--white);
  padding: 40px 0 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  text-align: right;
}

.footer-grid h3 {
  color: var(--white);
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a, .footer-contact p {
  color: var(--white);
  opacity: 0.9;
  transition: opacity 0.3s;
}

.footer-links a:hover {
  opacity: 1;
}

.social-icons a {
  color: var(--white);
  font-size: 1.5rem;
  margin-left: 15px;
  opacity: 0.8;
}

.social-icons a:hover {
  opacity: 1;
}

.footer-bottom {
  text-align: center;
}

.footer-bottom p {
  opacity: 0.7;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-main {
      flex-direction: column;
      align-items: stretch;
  }

  .search-box {
      order: 3;
      max-width: 100%;
  }

  .main-nav ul {
      flex-direction: column;
      align-items: center;
  }

  .header-features {
      justify-content: center;
  }
}

@media (max-width: 480px) {
  .top-bar .container {
      flex-direction: column;
      align-items: center;
      gap: 10px;
  }
  
  .logo-text h1 {
      font-size: 1.5rem;
  }

  .hero-banner h2 {
      font-size: 2em;
  }
}

/* تنسيقات النافذة المنبثقة (Modal) */
.modal {
  display: none; /* إخفاء النافذة بشكل افتراضي */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7); /* خلفية داكنة أكثر */
  justify-content: center;
  align-items: center;
  -webkit-backdrop-filter: blur(8px); /* زيادة تأثير الضباب */
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: var(--white);
  padding: 35px; /* زيادة المسافة الداخلية */
  border-radius: 15px;
  max-width: 550px; /* زيادة العرض قليلاً */
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3); /* ظل أكثر عمقاً */
  transform: scale(0.95) translateY(-30px); /* تبدأ بحجم أصغر وموقع أعلى */
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.5s;
}

.modal.show .modal-content {
  transform: scale(1) translateY(0); /* تعود إلى الحجم والموقع الطبيعي */
  opacity: 1;
}

/* إضافة شريط تدرج علوي مطابق للموقع */
.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px; /* سمك الشريط */
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.close-button {
  color: var(--text-color);
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 30px; /* حجم أكبر قليلاً */
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s, transform 0.3s;
}

.close-button:hover {
  color: var(--primary-color);
  transform: rotate(90deg); /* إضافة حركة دوران عند المرور بالماوس */
}

.modal-body h3 {
  color: var(--primary-color);
  font-size: 2.2rem; /* حجم أكبر قليلاً */
  margin-bottom: 10px;
}

.modal-body p {
  font-size: 1.15rem; /* حجم أكبر قليلاً */
  color: var(--text-color);
  line-height: 1.7;
  margin-top: 0;
}


.swiper-button-next::after,
.swiper-button-prev::after {
    content: "" !important;
}


::-webkit-scrollbar {
  width: 4px; 
  height: 4px; 
}

::-webkit-scrollbar-track {
  background: transparent; 
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-orange);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-orange); 
}

[x-cloak] {
  display: none !important;
}

.fas {
  display: flex !important;
  justify-content: center;
  align-items: center;
}

.tippy-box[data-theme~='success'] {
  background-color: #28a745;
  color: #fff;
}
.tippy-box[data-theme~='success'][data-placement^='top'] > .tippy-arrow::before {
  border-top-color: #28a745;
}
.tippy-box[data-theme~='success'][data-placement^='bottom'] > .tippy-arrow::before {
  border-bottom-color: #28a745;
}

.tippy-box{
  border-radius: 50px !important;
}
/* Danger (أحمر) */
.tippy-box[data-theme~='danger'] {
  background-color: #dc3545;
  color: #fff;
}
.tippy-box[data-theme~='danger'][data-placement^='top'] > .tippy-arrow::before {
  border-top-color: #dc3545;
}
.tippy-box[data-theme~='danger'][data-placement^='bottom'] > .tippy-arrow::before {
  border-bottom-color: #dc3545;
}

/* Info (أزرق) */
.tippy-box[data-theme~='info'] {
  background-color: #17a2b8;
  color: #fff;
}
.tippy-box[data-theme~='info'][data-placement^='top'] > .tippy-arrow::before {
  border-top-color: #17a2b8;
}
.tippy-box[data-theme~='info'][data-placement^='bottom'] > .tippy-arrow::before {
  border-bottom-color: #17a2b8;
}

.product-main .swiper-wrapper {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
}

.product-main .swiper-slide {
  width: 100% !important;
  flex: 0 0 100% !important;
}

.product-main .swiper-slide * {
  max-width: 100%;
}

.product-thumbs .swiper-wrapper {
  display: flex !important;
  flex-wrap: nowrap !important;
}
.product-thumbs .swiper-slide {
  width: 64px !important;
  height: 64px !important;
  flex: 0 0 auto !important;
}