/* =========================================================
   alsweed.sa — Custom CSS (نسخة سيليا React)
   ========================================================= */

/* ---------- جداول المواصفات ---------- */
.salla-multi-table,
.alsweed-table {
    width: 100%;
    border-collapse: separate; /* بدل collapse حتى تعمل الزوايا المدورة */
    border-spacing: 0;
    margin: 20px 0;
    font-size: 14px;
    direction: rtl;
    border: 1px solid #183AD2;
    box-shadow: 0 2px 8px rgb(24 58 210 / 12%);
    border-radius: 8px;
    overflow: hidden;
}

.salla-multi-table th,
.alsweed-table th {
    padding: 12px;
    text-align: center;
    color: #FFFFFF !important;
    font-weight: 700;
    background: #183AD2;
    border-bottom: 1px solid #e3e9ff;
    border-left: 1px solid #e3e9ff;
}

.salla-multi-table td,
.alsweed-table td {
    padding: 12px;
    text-align: center;
    color: #183AD2;
    border-bottom: 1px solid #e3e9ff;
    border-left: 1px solid #e3e9ff;
}

/* إزالة الحدود الزائدة عند الأطراف */
.salla-multi-table tr > :last-child,
.alsweed-table tr > :last-child {
    border-left: 0;
}

.salla-multi-table tbody tr:last-child td,
.alsweed-table tbody tr:last-child td {
    border-bottom: 0;
}

.salla-multi-table tbody tr:nth-child(odd),
.alsweed-table tbody tr:nth-child(odd) {
    background-color: #f7f9ff;
}

.salla-multi-table tbody tr:nth-child(even),
.alsweed-table tbody tr:nth-child(even) {
    background-color: #eef3ff;
}

.salla-multi-table tbody tr:hover,
.alsweed-table tbody tr:hover {
    background-color: #e3ebff;
}

@media (max-width: 600px) {
    .salla-multi-table,
    .alsweed-table {
        font-size: 12px;
    }

    .salla-multi-table th,
    .salla-multi-table td,
    .alsweed-table th,
    .alsweed-table td {
        padding: 8px 4px;
    }
}

/* ---------- الأسئلة الشائعة (بطاقة بيضاء بخط جانبي) ---------- */
.salla-faq-container,
.alsweed-faq-container {
    width: 100%;
    margin: 16px 0 24px;
    padding: 0;
    direction: rtl;
    font-family: inherit;
}

.salla-faq-item,
.alsweed-faq-item {
    background: #FFFFFF;
    border: 1px solid #e3e8f4;
    border-right: 4px solid #183AD2;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
    transition: box-shadow 0.2s ease;
}

.salla-faq-item:hover,
.alsweed-faq-item:hover {
    box-shadow: 0 6px 18px rgba(24, 58, 210, 0.10);
}

/* السؤال: نص أزرق مع أيقونة ؟ دائرية */
.salla-faq-item h3,
.alsweed-faq-item h3 {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 8px;
    padding: 0;
    background: none;
    color: #183AD2;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.6;
}

.salla-faq-item h3::before,
.alsweed-faq-item h3::before {
    content: '؟';
    flex: 0 0 26px;
    height: 26px;
    margin-top: 2px;
    border-radius: 50%;
    background: #eef3ff;
    color: #183AD2;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* الإجابة: رمادي من هوية المتجر، تبدأ تحت نص السؤال */
.salla-faq-item p,
.alsweed-faq-item p {
    margin: 0;
    padding: 0 36px 0 0;
    background: transparent;
    color: #5E5054;
    font-size: 15.5px;
    line-height: 1.8;
}

@media (max-width: 600px) {
    .salla-faq-item,
    .alsweed-faq-item {
        padding: 14px;
    }

    .salla-faq-item h3,
    .alsweed-faq-item h3 {
        font-size: 16px;
    }

    .salla-faq-item p,
    .alsweed-faq-item p {
        padding-right: 0;
        font-size: 14.5px;
    }
}

/* ---------- شعارات الماركات بالألوان ---------- */
/* الكلاس القديم + محدد عام لأي قسم ماركات في الثيم الجديد */
.s-block--brands img,
[class*="brands"] img {
    filter: none !important;
}

/* ---------- تصنيف مميز باللون الأحمر ---------- */
a[href*="c732765275"],
a[href*="c732765275"] * {
    color: #E30613 !important;
}

/* تثبيت زر الإضافة للسلة أسفل بطاقة المنتج في الجوال */
@media (max-width: 767px) {
  .product-card {
    display: flex;
    flex-direction: column;
  }
  .product-card > :last-child {
    margin-top: auto;
  }
}

/* فهرس المقال — الكمبيوتر (العمود الجانبي) */
#alsweed-toc{margin-bottom:24px;max-height:60vh;overflow:auto;background:#fff;border:1px solid #e3e8ef;border-top:4px solid #183AD2;border-radius:10px;padding:14px 16px;box-shadow:0 4px 14px rgba(0,0,0,.08);direction:rtl;font-size:14px;line-height:1.7}
#alsweed-toc b{display:block;margin-bottom:8px;color:#183AD2;font-size:15px}
#alsweed-toc ol{margin:0;padding-right:18px;list-style:decimal}
#alsweed-toc li{margin-bottom:6px}
#alsweed-toc a,#alsweed-toc-m a{color:#183AD2;text-decoration:underline dotted;text-decoration-color:rgba(24,58,210,.45);text-underline-offset:5px;transition:color .15s}
#alsweed-toc a:hover,#alsweed-toc-m a:hover,#alsweed-toc a.on{text-decoration-style:solid;text-decoration-color:#183AD2;font-weight:700}

/* فهرس المقال — الجوال (زر مصغّر تحت العنوان) */
#alsweed-toc-m{margin:12px 0 16px;background:#fff;border:1px solid #e3e8ef;border-right:4px solid #183AD2;border-radius:10px;direction:rtl;font-size:14px}
#alsweed-toc-m summary{cursor:pointer;padding:10px 14px;color:#183AD2;font-weight:700;list-style:none}
#alsweed-toc-m summary::-webkit-details-marker{display:none}
#alsweed-toc-m summary::after{content:'▾';float:left;transition:transform .2s}
#alsweed-toc-m[open] summary::after{transform:rotate(180deg)}
#alsweed-toc-m ol{margin:0;padding:0 34px 12px 14px;max-height:50vh;overflow:auto;list-style:decimal}
#alsweed-toc-m li{margin-bottom:6px;line-height:1.6}

/* إظهار كل نسخة في مكانها، وإخفاء الفهرس الأصلي داخل المقال */
@media (max-width:1023px){#alsweed-toc{display:none}}
@media (min-width:1024px){#alsweed-toc-m{display:none}}
.alsweed-toc-inline{display:none!important}

/* روابط المتجر داخل المقالات */
article a[href*="alsweed.sa"]{color:#183AD2;text-decoration:underline;text-underline-offset:3px;font-weight:600}
article a[href*="alsweed.sa"]:hover{color:#0f2a9e}

/* تثبيت فهرس المقال وحده أثناء التمرير (الكمبيوتر) */
@media (min-width: 1024px) {
  aside[aria-label="Sidebar"] {
    position: relative !important;
    align-self: stretch !important;
    max-height: none !important;
    overflow: visible !important;
  }
  #alsweed-toc {
    position: sticky;
    top: 110px;
    z-index: 5;
    max-height: calc(100vh - 130px);
  }
}

/* إظهار نصوص الفوتر مرة واحدة بدون حركة ظهور تدريجية */
footer *,
footer *::before,
footer *::after {
  animation-duration: 0s !important;
  animation-delay: 0s !important;
  transition-duration: 0s !important;
  transition-delay: 0s !important;
}
/* تقليل ارتفاع الفوتر: تقريب المسافات بين روابط «روابط تهمك» (الكمبيوتر) */
@media (min-width: 1024px) {
  footer :is(ul, nav, div):has(> :nth-child(6)):has(> * a[href*="/pages/"], > a[href*="/pages/"]) {
    gap: 2px !important;
    row-gap: 2px !important;
  }
  footer :is(ul, nav, div):has(> :nth-child(6)):has(> * a[href*="/pages/"], > a[href*="/pages/"]) > *,
  footer :is(ul, nav, div):has(> :nth-child(6)):has(> * a[href*="/pages/"], > a[href*="/pages/"]) a {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    line-height: 1.6 !important;
    min-height: 0 !important;
  }
}