/* ===========================
   🎯 WISHLIST PAGE STYLES
   =========================== */

/* ===== الصفحة العامة ===== */
.wishlist-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  background-color: #f9f9f9;
  min-height: 70vh;
}

.wishlist-header h2 {
  font-size: 1.75rem;
  color: #333;
  text-align: center;
  margin-bottom: 20px;
}

/* ===== الجدول العام ===== */
.table-responsive {
  margin-top: 20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.wishlist-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

/* ===== العناوين ===== */
.wishlist-table thead th {
  font-weight: 600;
  background: #333;
  color: #fff;
  padding: 12px 15px;
  border: 1px solid #ddd;
  text-align: center;
  vertical-align: middle;
}

/* ===== الخلايا ===== */
.wishlist-table td {
  padding: 12px 15px;
  border: 1px solid #ddd;
  text-align: center;
  vertical-align: middle;
  max-width: 500px;
}

/* ===== الصور داخل الجدول ===== */
.wishlist-table td img {
  min-width: 80px;
  min-height: 80px;
  max-width: 80px;
  max-height: 80px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

/* ===== اتجاه العمود الأول حسب اللغة ===== */

html[lang="en"] .wishlist-table td:first-child {
  text-align: left !important;
}


html[lang="ar"] .wishlist-table td:first-child {
  text-align: right !important;
}

/* ===========================
   🎨 الأزرار
   =========================== */

.delete-btn,
.btn-success,
.btn-details {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  border: 1px solid var(--gray-color);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* حذف */
.delete-btn {
  color: #dc3545;
  background: none;
}

.delete-btn:hover {
  background: var(--danger-color);
  color: #fff;
  transform: scale(1.1);
}

/* نجاح */
.btn-success {
  background: none;
  color: var(--dark-color);
}

.btn-success:hover {
  transform: scale(1.1);
  background-color: var(--gray-color);
}

/* تفاصيل */
.btn-details {
  background: none;
  color: var(--dark-color);
}

.btn-details:hover {
  transform: scale(1.1);
  background-color: var(--gray-color);
  color: var(--main-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* إضافة للسلة */
.add-to-cart-btn {
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.add-to-cart-btn:hover {
  transform: scale(1.1);
  color: var(--main-color);
}

/* ===== نصوص مخصصة ===== */
.text-muted {
  color: #6c757d;
  font-size: 14px;
  font-weight: 500;
}

.discount-percent {
  display: inline-block;
  background-color: var(--secondary-color);
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 400;
  padding: 4px 8px;
  white-space: nowrap;
}

.description-text {
  font-size: 0.9rem;
  display: block;
  min-width: 100px;
}

/* ---------- السلة الفارغة ---------- */
.empty-wishlist {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 36px 18px;
  text-align: center;
  box-shadow: var(--shadow);
}

.empty-wishlist h4 {
  margin: 12px 0 8px;
  color: var(--text);
}

/* ===========================
   ⭐ منتجات مميزة (Featured)
   =========================== */

.featured_products-thead {
  margin-top: 20px;
  text-align: center;
  vertical-align: middle;
  font-weight: 600;
  background: #333;
  color: #fff;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.featured_products-body {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 0 0 10px 10px;
  background: #fff;
  overflow-x: auto;
  display: block;
}

/* ===========================
   📱 تجاوب الشاشات الصغيرة
   =========================== */
@media (max-width: 768px) {
  .wishlist-table thead {
    display: none;
  }

  .wishlist-table,
  .wishlist-table tbody {
    display: block;
    width: 100%;
  }

  .wishlist-table tr {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
  }

  /* العمود الأول (الصورة) يأخذ عرض كامل */
  .wishlist-table tr td:first-child {
    flex: 1 1 100%;

  }

  /* الأعمدة التالية */
  .wishlist-table tr td:nth-child(2) {
    flex: 1 1 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
  }

  .wishlist-table tr td:nth-child(3),
  .wishlist-table tr td:nth-child(4),
  .wishlist-table tr td:nth-child(5) {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 calc(100% / 3);
    border: none;
    text-align: center;
    white-space: nowrap;
  }

  /* محتوى الكارد */
  .wishlist-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
  }

  .wishlist-card-top img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
  }

  .wishlist-card-details {
    flex: 1;
  }

  .wishlist-card-details h4 {
    font-size: 15px;
    margin: 0 0 6px;
    font-weight: bold;
  }

  .wishlist-card-details .price {
    font-size: 14px;
    color: #28a745;
    font-weight: bold;
  }

  .wishlist-card-actions {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
    padding: 10px;
    gap: 10px;
  }

  .wishlist-card-actions button {
    flex: 1;
    padding: 8px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
  }

  .wishlist-card-actions .add {
    background: #28a745;
    color: #fff;
  }

  .wishlist-card-actions .remove {
    background: #dc3545;
    color: #fff;
  }

  .wishlist-card-actions button:hover {
    opacity: 0.9;
  }

  .featured-products-container-slider {
    max-width: 280px;
  }
}

/* ✅ تحسين إضافي للشاشات الصغيرة جدًا */
@media (max-width: 480px) {
  .featured_products-thead {
    font-size: 12px;
    padding: 6px;
  }

  .featured_products-body {
    font-size: 12px;
    padding: 6px;
  }

  .featured_products-body table,
  .featured_products-thead table {
    width: 100%;
    display: block;
    overflow-x: auto;
  }

  .featured-products-container-slider {
    max-width: 280px;
  }

  .wishlist-card-top img {
    width: 70px;
    height: 70px;
  }

  .wishlist-card-details h4 {
    font-size: 13px;
  }

  .wishlist-card-details .price {
    font-size: 13px;
  }
}