/* ================================================================
    2. التنسيقات العامة للمشروع
    ================================================================
*/
body, html, * {
    font-family: 'Cairo', sans-serif !important;
}

body {
    background-color: #f8fafc;
    -webkit-tap-highlight-color: transparent;
}

[x-cloak] { display: none !important; }

.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ================================================================
    3. تنسيقات واجهة المتجر (Swiper + Categories)
    ================================================================
*/
.swiper-pagination-bullet { background-color: #cbd5e1; opacity: 1; }
.swiper-pagination-bullet-active { background-color: #19a59b !important; width: 18px; border-radius: 4px; }

.categories-scroll { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.category-btn { scroll-snap-align: start; flex: 0 0 auto; }

/* حل مشكلة انزياح التصميم (CLS) لصور المنتجات والسلايدر */
.product-card-img, .swiper-slide img {
    aspect-ratio: 1 / 1;
    background-color: #f1f5f9;
    object-fit: cover;
    width: 100%;
}

/* ================================================================
    4. كلاس الأرقام الإنجليزية الإجباري
    ================================================================
*/
.en-nums {
    font-family: 'Cairo', sans-serif !important;
    display: inline-block;
    unicode-bidi: plaintext;
}

/* ================================================================
    5. تنسيقات المحرر النصي (TinyMCE / Editor Content)
    ================================================================
*/
.editor-content { line-height: 1.8; color: #475569; }
.editor-content p { margin-bottom: 1rem; }
.editor-content h1, .editor-content h2, .editor-content h3, .editor-content h4, .editor-content h5, .editor-content h6 { color: #1e293b; font-weight: 900; margin-top: 1.5rem; margin-bottom: 1rem; line-height: 1.4; }
.editor-content h1 { font-size: 2rem; }
.editor-content h2 { font-size: 1.5rem; }
.editor-content h3 { font-size: 1.25rem; }
.editor-content h4 { font-size: 1.125rem; }
.editor-content ul { list-style-type: disc; padding-right: 1.5rem; margin-bottom: 1rem; }
.editor-content ol { list-style-type: decimal; padding-right: 1.5rem; margin-bottom: 1rem; }
.editor-content li { margin-bottom: 0.5rem; }
.editor-content a { color: #19a59b; text-decoration: underline; }
.editor-content strong, .editor-content b { font-weight: 800; color: #1e293b; }
.editor-content em, .editor-content i { font-style: italic; }
.editor-content table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.editor-content th, .editor-content td { border: 1px solid #cbd5e1; padding: 0.75rem; text-align: right; }
.editor-content blockquote { border-right: 4px solid #19a59b; padding-right: 1rem; color: #64748b; font-style: italic; background: #f8fafc; padding: 1rem; margin-bottom: 1rem; border-radius: 0.5rem; }
.editor-content img { max-width: 100%; height: auto; border-radius: 0.5rem; margin: 1rem 0; }

/* ================================================================
    6. تنسيقات لوحة التحكم (CPanel) - مسافات وامتداد الصفحة
    ================================================================
*/
.custom-page-wrapper {
    margin-top: -5px;
    margin-bottom: 20px;
    width: auto;
    display: block;
    box-sizing: border-box;
}
@media (min-width: 768px) {
    .custom-page-wrapper { margin-right: 0px; margin-left: -5px; }
}
@media (max-width: 767px) {
    .custom-page-wrapper { margin-right: 5px; margin-left: 5px; }
}

/* ================================================================
    7. تحسينات الأداء وإمكانية الوصول النهائية (Google PageSpeed)
    ================================================================
*/

/* إرجاع نقاط السلايدر لحجمها الطبيعي والأنيق */
.swiper-pagination-bullet {
    width: 8px !important;
    height: 8px !important;
    margin: 0 4px !important;
    background-color: #cbd5e1 !important;
    opacity: 1 !important;
}
.swiper-pagination-bullet-active {
    width: 18px !important;
    border-radius: 4px !important;
    background-color: #19a59b !important;
}
/* تحسين أهداف اللمس للأزرار فقط (تم استبعاد نقاط السلايدر من هذا التكبير) */
button, .category-btn {
    min-width: 32px;
    min-height: 32px;
}