/* Add custom CSS styles below */
/* =========================
   تحسين نسخة الجوال
   OVIA - Theme Fakhama
   ========================= */

@media (max-width: 768px) {

    /* منع أي عنصر من تجاوز عرض الشاشة */
    html,
    body {
        max-width: 100%;
        overflow-x: hidden !important;
    }

    /* توسيط محتوى الصفحة */
    .container,
    .container-fluid {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* =========================
       السلايدر الرئيسي
       ========================= */

    .swiper,
    .swiper-container {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        overflow: hidden !important;
    }

    .swiper-wrapper {
        max-width: 100% !important;
    }

    .swiper-slide {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .swiper-slide img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
        object-fit: cover !important;
    }

    /* =========================
       الأقسام
       ========================= */

    section {
        max-width: 100% !important;
        overflow: hidden !important;
    }

    /* عنوان القسم يكون بالنص */
    .section-header {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }

    .section-title,
    .section--title {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* =========================
       المنتجات
       ========================= */

    .products-slider,
    .product-slider {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .products-slider .swiper-wrapper,
    .product-slider .swiper-wrapper {
        max-width: 100% !important;
    }

    /* بطاقات المنتجات */
    .product-card {
        box-sizing: border-box !important;
        max-width: 100% !important;
    }

    /* الصور */
    .product-card img {
        max-width: 100% !important;
        height: auto;
        object-fit: cover;
    }

    /* =========================
       الصور والعناصر الكبيرة
       ========================= */

    img,
    video,
    iframe {
        max-width: 100% !important;
    }

    /* =========================
       منع العناصر من الخروج يمين الشاشة
       ========================= */

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* =========================
       المسافات الجانبية
       ========================= */

    .section {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        box-sizing: border-box !important;
    }

}
/* =========================================
   تحويل منتجات الجوال إلى شبكة 2 × 2
   ========================================= */

@media (max-width: 768px) {

    /* إلغاء نظام السلايدر */
    .s-products-slider-wrapper .swiper {
        overflow: visible !important;
    }

    .s-products-slider-wrapper .swiper-wrapper {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
        transform: none !important;
        width: 100% !important;
        margin: 0 !important;
    }

    /* كل منتج */
    .s-products-slider-wrapper .swiper-slide {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }

    /* منع السحب الأفقي */
    .s-products-slider-wrapper {
        overflow: visible !important;
    }

    .s-products-slider-wrapper .swiper {
        overflow: visible !important;
    }
}