/**
 * ملف الأنماط الرئيسي - IT Market 24
 * يحتوي على جميع التنسيقات الخاصة بالموقع لضمان تجربة مستخدم متميزة
 */

/* ========== الأنماط العامة ========== */

:root {
  /* الألوان الرئيسية */
  --primary-color: #3498db;  /* أزرق */
  --secondary-color: #2ecc71; /* أخضر */
  --accent-color: #e74c3c;   /* أحمر */
  --light-color: #f8f9fa;    /* فاتح */
  --dark-color: #343a40;     /* داكن */
  --gray-color: #6c757d;     /* رمادي */
  
  /* الخطوط */
  --main-font: 'Cairo', sans-serif;
  --heading-font: 'Tajawal', sans-serif;
}

body {
  font-family: var(--main-font);
  padding-top: 60px; /* مساحة للقائمة العلوية الثابتة */
  background-color: #f5f5f5;
  color: #333;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: 600;
}

.section-title {
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
  position: relative;
  margin-bottom: 20px;
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100px;
  height: 2px;
  background-color: var(--accent-color);
}

/* تنسيقات لدعم اللغة العربية والانجليزية (RTL & LTR) */
.rtl {
  direction: rtl;
  text-align: right;
}

.ltr {
  direction: ltr;
  text-align: left;
}

/* ========== تنسيقات القائمة العلوية ========== */

.navbar {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
  height: 40px;
  width: auto;
}

/* مؤشر عدد عناصر السلة */
.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--accent-color);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  width: 18px;
  height: 18px;
  text-align: center;
  line-height: 18px;
}

.rtl .cart-count {
  right: auto;
  left: 0;
}

/* ========== تنسيقات الصفحة الرئيسية ========== */

/* شريحة العرض الرئيسية */
.hero-slider {
  margin-bottom: 30px;
}

.hero-slider .carousel-item {
  height: 300px;
  background-size: cover;
  background-position: center;
}

.hero-caption {
  background-color: rgba(0, 0, 0, 0.6);
  padding: 15px;
}

/* بطاقات المنتجات */
.product-card {
  transition: transform 0.3s, box-shadow 0.3s;
  margin-bottom: 20px;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-img-container {
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img-container img {
  max-height: 100%;
  width: auto;
  transition: transform 0.3s;
}

.product-card:hover .product-img-container img {
  transform: scale(1.05);
}

.product-price {
  font-weight: bold;
  color: var(--dark-color);
}

.product-price.sale {
  color: var(--accent-color);
}

.original-price {
  text-decoration: line-through;
  color: var(--gray-color);
  font-size: 0.9em;
}

/* ========== تنسيقات صفحة المنتج ========== */

.product-images {
  margin-bottom: 20px;
}

.product-thumbnails {
  margin-top: 10px;
}

.product-thumbnails img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid #ddd;
  margin: 0 5px;
}

.product-thumbnails img.active {
  border-color: var(--primary-color);
}

.product-details .price {
  font-size: 24px;
  font-weight: bold;
  margin: 10px 0;
}

.product-quantity {
  display: flex;
  align-items: center;
  margin: 20px 0;
}

.quantity-input {
  width: 60px;
  text-align: center;
  margin: 0 10px;
}

/* ========== تنسيقات سلة التسوق ========== */

.cart-item {
  border-bottom: 1px solid #eee;
  padding: 15px 0;
}

.cart-item-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.cart-totals .row {
  margin-bottom: 10px;
}

.cart-totals .total {
  font-weight: bold;
  font-size: 1.2em;
}

/* ========== تنسيقات لوحة التحكم ========== */

.dashboard-stats {
  margin-bottom: 30px;
}

.dashboard-stat {
  background-color: white;
  border-radius: 5px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dashboard-stat-icon {
  font-size: 30px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 15px;
}

.dashboard-stat-value {
  font-size: 24px;
  font-weight: bold;
}

/* ألوان إحصائيات لوحة التحكم */
.stat-primary .dashboard-stat-icon {
  background-color: rgba(52, 152, 219, 0.2);
  color: var(--primary-color);
}

.stat-success .dashboard-stat-icon {
  background-color: rgba(46, 204, 113, 0.2);
  color: var(--secondary-color);
}

.stat-danger .dashboard-stat-icon {
  background-color: rgba(231, 76, 60, 0.2);
  color: var(--accent-color);
}

/* ========== تنسيقات الخدمات التقنية ========== */

.service-card {
  border: 1px solid #dee2e6;
  border-radius: 5px;
  padding: 20px;
  margin-bottom: 20px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.service-icon {
  font-size: 40px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.service-price {
  font-weight: bold;
  color: var(--secondary-color);
}

/* ========== تنسيقات المدونة ========== */

.blog-card {
  margin-bottom: 20px;
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.blog-img {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.blog-meta {
  margin-bottom: 10px;
  font-size: 0.9em;
  color: var(--gray-color);
}

.blog-content img {
  max-width: 100%;
  height: auto;
}

.blog-comments {
  margin-top: 30px;
}

.comment {
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
  margin-bottom: 15px;
}

/* ========== ذيل الصفحة ========== */

footer {
  background-color: var(--dark-color);
  color: white;
  padding: 30px 0;
  margin-top: 50px;
}

footer a {
  color: #ddd;
  text-decoration: none;
}

footer a:hover {
  color: white;
  text-decoration: underline;
}

/* ========== تنسيقات للأجهزة المحمولة ========== */

/* للشاشات الصغيرة (الهواتف) */
@media (max-width: 767.98px) {
  .product-img-container {
    height: 160px;
  }
  
  .hero-slider .carousel-item {
    height: 200px;
  }
  
  .dashboard-stat {
    text-align: center;
  }
  
  .cart-item-img {
    width: 60px;
    height: 60px;
  }
}

/* للشاشات المتوسطة (التابلت) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .product-img-container {
    height: 180px;
  }
}

/* للشاشات الكبيرة (أجهزة الكمبيوتر) */
@media (min-width: 992px) {
  .hero-slider .carousel-item {
    height: 400px;
  }
}

/* ========== تنسيقات الإشعارات ========== */

/* قائمة الإشعارات المنسدلة */
.notification-dropdown {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.notification-dropdown .dropdown-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

.notification-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

.notification-dropdown .dropdown-item:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.notification-dropdown .dropdown-item.bg-light {
    background-color: rgba(0, 123, 255, 0.1) !important;
}

.notification-dropdown .dropdown-header {
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
    padding: 0.75rem 1rem 0.5rem;
}

/* مؤشر عدد الإشعارات */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
    line-height: 18px;
    text-align: center;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* صفحة الإشعارات */
.notification-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.notification-card:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transform: translateY(-1px);
}

.notification-card.unread {
    border-left: 4px solid #0d6efd;
    background-color: rgba(13, 110, 253, 0.02);
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #212529;
}

.notification-message {
    color: #6c757d;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.notification-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

/* زر تعليم الكل كمقروء */
.mark-all-read-btn {
    color: #0d6efd;
    text-decoration: none;
    border: none;
    background: none;
    font-size: 0.8rem;
}

.mark-all-read-btn:hover {
    color: #0b5ed7;
    text-decoration: underline;
}

/* للشاشات الصغيرة */
@media (max-width: 767.98px) {
    .notification-dropdown {
        min-width: 300px !important;
        max-width: 90vw;
    }
    
    .notification-dropdown .dropdown-item {
        padding: 0.5rem 0.75rem;
    }
}

/* تنسيقات صفحة الإحصائيات */
.stats-card {
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
}

.stats-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

#salesChart {
    min-height: 300px;
}

/* تنسيقات خاصة بالفلتر */
.filter-card {
    background-color: #f8f9fa;
    border-radius: 10px;
}

/* تنسيقات للبطاقات */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}