/* ======================================
   مجلة التجارة – العلامات التجارية
   ====================================== */

.trade-bulletin-view {
  padding: 2rem 0;
}

/* شبكة العرض */
.trade-bulletin-view .views-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* الكرت */
.trade-bulletin-view .views-row {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.trade-bulletin-view .views-row:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

/* صورة العلامة */
.trade-bulletin-view .views-row img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

/* رقم العلامة */
.trademark-number {
  font-weight: 700;
  color: #0b3c5d;
  margin-bottom: 0.25rem;
}

/* اسم صاحب العلامة */
.trademark-owner {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 0.5rem;
}

/* نوع الإجراء */
.trademark-action {
  display: inline-block;
  font-size: 0.8rem;
  background: #f1f5f9;
  color: #0b3c5d;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

/* التاريخ */
.trademark-date {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

/* زر التفاصيل */
.trademark-details-link a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  background: #0b3c5d;
  color: #ffffff;
  border-radius: 6px;
  font-size: 0.85rem;
  text-decoration: none;
}

.trademark-details-link a:hover {
  background: #08314d;
}

/* الفلاتر */
.trade-bulletin-view .views-exposed-form {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.trade-bulletin-view .views-exposed-form .form-item {
  flex: 1 1 200px;
}

.trade-bulletin-view .views-exposed-form input,
.trade-bulletin-view .views-exposed-form select {
  width: 100%;
}


/* ======================================
   ترويسة صفحة مجلة التجارة
   ====================================== */

.trade-bulletin-page {
  max-width: 1200px;
  margin: 0 auto;
}

/* الترويسة */
.trade-bulletin-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

/* مسار التنقل */
.trade-breadcrumb {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.trade-breadcrumb a {
  color: #0b3c5d;
  text-decoration: none;
}

.trade-breadcrumb span {
  margin: 0 0.25rem;
}

/* عنوان الصفحة */
.trade-page-title {
  font-size: 1.9rem;
  font-weight: 700;
  color: #0b3c5d;
  margin-bottom: 0.5rem;
  margin-top: inherit;
}

/* وصف الصفحة */
.trade-page-description {
  font-size: 1rem;
  color: #4b5563;
  max-width: 930px;
  line-height: 1.6;
}

/* ======================================
   إطار المحتوى
   ====================================== */

.trade-bulletin-view {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.5rem;
}


/* ======================================
   تحسين الترويسة
   ====================================== */

.trade-bulletin-header {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  padding: 2rem 2rem 1.5rem;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  margin-bottom: 2.5rem;
}

.trade-bulletin-header::after {
  content: "";
  display: block;
  height: 2px;
  background: #0b3c5d;
  border-radius: 2px;
  margin-top: 1rem;
}


/* ======================================
   مسار التنقل
   ====================================== */

.trade-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.trade-breadcrumb a {
  color: #0b3c5d;
  font-weight: 500;
}

.trade-breadcrumb span {
  opacity: 0.6;
}


/* ======================================
   الفلاتر
   ====================================== */

.trade-bulletin-view .views-exposed-form {
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  padding: 1.25rem;
  border-radius: 14px;
  margin-bottom: 2.5rem;
}

.trade-bulletin-view .views-exposed-form label {
  font-size: 0.8rem;
  color: #374151;
  margin-bottom: 0.25rem;
  display: block;
}

.trade-bulletin-view .views-exposed-form input,
.trade-bulletin-view .views-exposed-form select {
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 0.4rem 0.5rem;
}

.trade-bulletin-view .views-exposed-form .form-actions {
  align-self: flex-end;
}



/* ======================================
   كروت العلامات التجارية – تصحيح نهائي
   ====================================== */


/* الكرت الحقيقي */
.trade-bulletin-view .views-view-grid .views-row > .views-col {
  background: #f9fafb; /* خلفية خفيفة */
  border: 1px solid #e5e7eb; /* إطار واضح */
  border-radius: 16px;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

/* الشريط العلوي البسيط */
.trade-bulletin-view .views-view-grid .views-row > .views-col::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #0b3c5d, #b08a57);
}

/* Hover */
.trade-bulletin-view .views-view-grid .views-row > .views-col:hover {
  background: #ffffff;
  box-shadow: 0 14px 35px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}

/* ترتيب المسافات داخل الكرت */
.trade-bulletin-view .views-view-grid .views-row > .views-col .views-field {
  margin-bottom: 0.6rem;
}




/* ======================================
   زر التفاصيل
   ====================================== */

.trademark-details-link a {
  background: linear-gradient(135deg, #0b3c5d, #0a2f4a);
  font-weight: 500;
  letter-spacing: 0.2px;
}

.trademark-details-link a:hover {
  background: linear-gradient(135deg, #08314d, #06283f);
}


/* ======================================
   حل نهائي لإطار كروت Views (Grid / Table)
   ====================================== */

/* الكرت – في جميع حالات Views */
.trade-bulletin-view .views-row {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

/* الشريط العلوي */
.trade-bulletin-view .views-row::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #0b3c5d, #b08a57);
}

/* Hover */
.trade-bulletin-view .views-row:hover {
  background: #ffffff;
  box-shadow: 0 14px 35px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}

/* مسافات داخلية منظمة */
.trade-bulletin-view .views-row .views-field {
  margin-bottom: 0.6rem;
}



/* ======================================
   كروت العلامات التجارية – Unformatted
   ====================================== */

.trade-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}


/* الكرت */
.trade-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

/* الشريط العلوي */
.trade-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #0b3c5d, #b08a57);
}

/* Hover */
.trade-card:hover {
  background: #ffffff;
  box-shadow: 0 14px 35px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}

/* مسافات داخلية */
.trade-card .views-field {
  margin-bottom: 0.6rem;
}


/* ======================================
   تحسين مسار التنقل (Breadcrumb)
   ====================================== */

.trade-breadcrumb {
  background: #eef6fb; /* أزرق مائي خفيف */
  border: 1px solid #d9ecf7;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* الروابط */
.trade-breadcrumb a {
  color: #0b3c5d;
  font-weight: 500;
  text-decoration: none;
}

/* الفواصل */
.trade-breadcrumb span {
  color: #94a3b8;
}

/* آخر عنصر (الصفحة الحالية) */
.trade-breadcrumb span:last-child {
  background: #0b3c5d;
  color: #ffffff;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
}


/* ======================================
   عنوان الصفحة
   ====================================== */

.trade-page-title {
  position: relative;
  padding-bottom: 0.5rem;
}

/* خط سفلي خفيف */
.trade-page-title::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 70px;
  height: 3px;
  background: linear-gradient(90deg, #0b3c5d, #b08a57);
  border-radius: 2px;
}


/* تحسين خفيف للفلاتر */
.trade-filters {
  margin-bottom: 2rem;
}

.trade-filters .views-exposed-form {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}


.trade-empty-message {
  padding: 2rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  text-align: center;
  color: #475569;
  font-size: 0.95rem;
}

/*-----------------------------------------------*/

.trade-filters {
  background: #f9fbfd;
  border: 1px solid #e3eaf1;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.filter-item {
  display: flex;
  flex-direction: column;
}

.filter-item label {
  font-size: 14px;
  margin-bottom: 6px;
  color: #0b3c5d;
}

.filter-item input,
.filter-item select {
  padding: 8px 10px;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
}

.filter-wide {
  grid-column: span 2;
}

.filter-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.btn-primary {
  background: #0b5ed7;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
}

.btn-secondary {
  background: #e9eef3;
  color: #333;
  padding: 8px 18px;
  border-radius: 6px;
  text-decoration: none;
}


.trade-loading {
  padding: 20px;
  text-align: center;
  color: #0b5ed7;
  font-weight: bold;
}

@media (max-width: 768px) {
  .filters-grid {
    grid-template-columns: 1fr;
  }
}


.trade-card-image {
  margin-bottom: 0.75rem;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trade-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.trade-card-placeholder {
  font-size: 0.85rem;
  color: #94a3b8;
}



/*==============تجميد الفلاتر شكليًا===========
.trade-filters {
  position: relative;
  opacity: 0.7;
}

.trade-filters::after {
  content: "سيتم تفعيل الفلاتر قريبًا";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.9);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: #0b3c5d;
  pointer-events: none;
}

.trade-filters input,
.trade-filters select,
.trade-filters button {
  pointer-events: none;
}
*/
/*------------------------------------------*/
/*------ تحسين زر تحميل المزيد --------*/
.trade-load-more-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;   /* مسافة علوية مريحة */
  margin-bottom: 2rem;  /* مسافة قبل الفوتر */
}

.trade-load-more-btn {
  min-width: 160px;
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  border-radius: 6px;
}

/* أثناء التحميل */
.trade-load-more-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/*------------------------------------------*/

/* ============================
   تنويه قانوني – صفحة العلامات
   ============================ */

.trade-legal-note {
  margin-top: 16px;
  padding: 12px 16px;
  background: #f5f8fb;
  border-right: 4px solid #1f5ea8;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
}


/* ============================
   شريط إغلاق صفحة العلامات
   ============================ */

.trade-page-footer {
  margin-top: 48px;
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 2px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-size: 13px;
  color: #334155;
}

.trade-page-footer .footer-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trade-page-footer .footer-updated {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #475569;
}

.trade-page-footer .footer-share {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trade-page-footer .footer-share a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.trade-page-footer .footer-share a:hover {
  background: #cbd5f5;
  transform: translateY(-2px);
}

.trade-page-footer svg {
  width: 16px;
  height: 16px;
  fill: #1f2937;
}


@media (max-width: 768px) {
  .trade-page-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .trade-page-footer .footer-share {
    align-self: flex-start;
  }
}



/* === Trademark Details Page === */

.trade-card--details {
  margin-top: 2rem;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 2rem;
}

.detail {
  display: flex;
  flex-direction: column;
}

.detail--full {
  grid-column: 1 / -1;
}

.detail .label {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.detail .value {
  font-size: 1rem;
  color: #111827;
  line-height: 1.6;
}



.footer-share a {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e5e7eb;
  text-decoration: none;
}

.footer-share a::before {
  font-weight: bold;
}

.share-whatsapp::before {
  content: "WA";
}

.share-facebook::before {
  content: "FB";
}

.share-x::before {
  content: "X";
}

.trade-card--sub {
  margin-top: 1.5rem;
}

.trade-footer-note {
  margin-top: 3rem;
  padding: 1rem 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-note-content {
  font-size: 0.9rem;
  color: #374151;
}

.footer-meta {
  margin-inline-start: 1rem;
  color: #6b7280;
}

.footer-share a {
  margin-inline-start: 0.5rem;
  font-size: 1.1rem;
  color: #1f2937;
  text-decoration: none;
}

.footer-share a:hover {
  color: #2563eb;
}



/* === Trademark Details – Table View === */

.trade-details-table {
  width: 100%;
  border-collapse: collapse;
}

.trade-details-table th,
.trade-details-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

.trade-details-table th {
  width: 220px;
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
  text-align: start;
}

.trade-details-table td {
  color: #111827;
  line-height: 1.6;
}

/* Footer */
.trade-footer-note {
  margin-top: 3rem;
  padding: 1rem 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}


/* === Trademark Details Header Layout === */

.trade-details-header {
  padding-bottom: 2rem;
}

.trade-details-header-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 2rem;
  align-items: center;
}

.trade-details-header-image img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: 0.75rem;
}

.trade-image-placeholder {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #6b7280;
  font-size: 0.9rem;
  text-align: center;
}

/* موبايل */
@media (max-width: 768px) {
  .trade-details-header-grid {
    grid-template-columns: 1fr;
  }

  .trade-details-header-image {
    order: -1;
  }
}



/* ============================= */
/* جدول تفاصيل العلامة التجارية */
/* ============================= */

.trademark-details-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.trademark-details-table th,
.trademark-details-table td {
  padding: 14px 16px;
  vertical-align: top;
  border-bottom: 1px solid #e6edf3;
}

/* عمود أسماء الحقول */
.trademark-details-table th {
  width: 220px;
  background-color: #f5f8fb;
  color: #0b3558;
  font-weight: 600;
  text-align: right; /* ✅ محاذاة يمين */
  white-space: nowrap;
}

/* عمود القيم */
.trademark-details-table td {
  background-color: #ffffff;
  color: #1f2d3d;
}

/* هوفر الصف */
.trademark-details-table tbody tr:hover td {
  background-color: #ffffff; /* يبقى أبيض */
}

.trademark-details-table tbody tr:hover th {
  background-color: #f5f8fb; /* يبقى ثابت */
}



/*-----امشاركات السوشال ميديا في صفحة تفاصيل العلامة ---*/
.trademark-share {
  display: flex;
  gap: 10px;
}

.trademark-share .share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eef4f8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b3558;
  transition: background 0.2s ease;
}

.trademark-share .share-btn:hover {
  background: #d9e6f0;
}


/*---------------------------------------------*/


/* ============================
   Mobile – Header & Title
   ============================ */
@media (max-width: 768px) {

  .trade-bulletin-header {
    padding: 1.25rem 1rem 1rem;
    margin-bottom: 1.5rem;
  }

  .trade-page-title {
    font-size: 1.4rem;
    line-height: 1.4;
  }

  .trade-page-description {
    font-size: 0.9rem;
    line-height: 1.6;
  }

}


/* ============================
   Mobile – Breadcrumb
   ============================ */
@media (max-width: 768px) {

  .trade-breadcrumb {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    flex-wrap: wrap;
  }

  .trade-breadcrumb span:last-child {
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
  }

}


/* ============================
   Mobile – Cards
   ============================ */
@media (max-width: 768px) {

  .trade-bulletin-view .views-row,
  .trade-card {
    padding: 1rem;
    transform: none !important;
  }

  .trade-bulletin-view .views-row:hover,
  .trade-card:hover {
    box-shadow: none;
    transform: none;
  }

}


/* ============================
   Mobile – Products field
   ============================ */
@media (max-width: 768px) {

  .detail--full .value {
    max-height: 140px;
    overflow-y: auto;
    padding-right: 4px;
  }

}

/* ============================
   Mobile – Trademark Details Table
   ============================ */
@media (max-width: 768px) {

  .trademark-details-table th {
    width: 38%;
    font-size: 0.85rem;
    white-space: normal;
  }

  .trademark-details-table td {
    font-size: 0.9rem;
  }

}


