/* Add custom CSS styles below */ 
/* تحسينات CSS لقسم سيارات MG - هوية اليوم الوطني السعودي */
/* يعمل فقط داخل s-block s-block--categories و s-block s-block--categories merge-with-top-component */

.s-block.s-block--categories,
.s-block.s-block--categories.merge-with-top-component {
    margin-top: 0.5rem;
    position: relative;
    z-index: 1;
    background: #ffffff;
    padding: 30px 0 20px 0; /* تقليل المساحات العلوية والسفلية */
    overflow: hidden;
}

.s-block.s-block--categories::before,
.s-block.s-block--categories.merge-with-top-component::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 102, 51, 0.03) 0%, rgba(34, 139, 34, 0.03) 100%);
    z-index: 1;
}

.s-block.s-block--categories .container,
.s-block.s-block--categories.merge-with-top-component .container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* تحسين العنوان */
.s-block.s-block--categories .s-slider-block__title,
.s-block.s-block--categories.merge-with-top-component .s-slider-block__title {
    margin-bottom: 1rem !important; /* الحفاظ على إعدادك الأصلي */
    text-align: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 120px; /* إضافة مساحة للأزرار على الجانبين */
}

.s-block.s-block--categories .s-slider-block__title h2,
.s-block.s-block--categories.merge-with-top-component .s-slider-block__title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #006633; /* الأخضر السعودي */
    margin: 0;
    position: relative;
    display: inline-block;
    padding: 0 30px;
    text-shadow: 0 2px 4px rgba(0, 102, 51, 0.1);
}

.s-block.s-block--categories .s-slider-block__title h2::before,
.s-block.s-block--categories .s-slider-block__title h2::after,
.s-block.s-block--categories.merge-with-top-component .s-slider-block__title h2::before,
.s-block.s-block--categories.merge-with-top-component .s-slider-block__title h2::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, #006633, #228B22);
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 102, 51, 0.2);
}

.s-block.s-block--categories .s-slider-block__title h2::before,
.s-block.s-block--categories.merge-with-top-component .s-slider-block__title h2::before {
    right: 100%;
    margin-right: 15px;
}

.s-block.s-block--categories .s-slider-block__title h2::after,
.s-block.s-block--categories.merge-with-top-component .s-slider-block__title h2::after {
    left: 100%;
    margin-left: 15px;
}

/* إصلاح موقع أزرار التنقل - وضعها على الجانبين */
.s-block.s-block--categories .s-slider-block__title-nav,
.s-block.s-block--categories.merge-with-top-component .s-slider-block__title-nav {
    position: absolute !important;
    top: 50% !important;
    right: 0 !important; /* تغيير من left إلى right */
    left: auto !important;
    transform: translateY(-50%) !important;
    display: flex;
    gap: 10px;
    z-index: 3;
}

/* إضافة أزرار على الجانب الأيسر أيضاً (اختياري) */
.s-block.s-block--categories .s-slider-block__title-nav--left,
.s-block.s-block--categories.merge-with-top-component .s-slider-block__title-nav--left {
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    right: auto !important;
    transform: translateY(-50%) !important;
    display: flex;
    gap: 10px;
    z-index: 3;
}

.s-block.s-block--categories .s-slider-nav-arrow,
.s-block.s-block--categories.merge-with-top-component .s-slider-nav-arrow {
    width: 50px;
    height: 50px;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    background: #ffffff;
    color: #006633;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 3;
}

.s-block.s-block--categories .s-slider-nav-arrow:hover:not(:disabled),
.s-block.s-block--categories.merge-with-top-component .s-slider-nav-arrow:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 51, 0.25);
    background: rgba(0, 102, 51, 0.1);
    border-color: #006633;
    color: #006633;
}

.s-block.s-block--categories .s-slider-nav-arrow:disabled,
.s-block.s-block--categories.merge-with-top-component .s-slider-nav-arrow:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
}

.s-block.s-block--categories .s-slider-nav-arrow svg,
.s-block.s-block--categories.merge-with-top-component .s-slider-nav-arrow svg {
    width: 24px;
    height: 24px;
}

/* تحسين الشرائح - تقليل z-index لتجنب التعارض */
.s-block.s-block--categories .swiper-slide,
.s-block.s-block--categories.merge-with-top-component .swiper-slide {
    padding: 10px; /* تقليل المساحة حول كل بطاقة */
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.s-block.s-block--categories .swiper-slide:hover,
.s-block.s-block--categories.merge-with-top-component .swiper-slide:hover {
    transform: translateY(-5px);
    z-index: 2;
}

.s-block.s-block--categories .slide--cat-entry,
.s-block.s-block--categories.merge-with-top-component .slide--cat-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 30px 20px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(0, 102, 51, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.s-block.s-block--categories .slide--cat-entry::before,
.s-block.s-block--categories.merge-with-top-component .slide--cat-entry::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, #006633, #228B22);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 102, 51, 0.3);
}

.s-block.s-block--categories .slide--cat-entry:hover::before,
.s-block.s-block--categories.merge-with-top-component .slide--cat-entry:hover::before {
    transform: scaleX(1);
}

.s-block.s-block--categories .slide--cat-entry:hover,
.s-block.s-block--categories.merge-with-top-component .slide--cat-entry:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 102, 51, 0.15);
    border-color: rgba(0, 102, 51, 0.2);
}

/* تحسين الصور */
.s-block.s-block--categories .slide--cat-entry img,
.s-block.s-block--categories.merge-with-top-component .slide--cat-entry img {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid #f8f9fa;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.s-block.s-block--categories .slide--cat-entry:hover img,
.s-block.s-block--categories.merge-with-top-component .slide--cat-entry:hover img {
    transform: scale(1.1);
    border-color: #006633;
    box-shadow: 0 6px 20px rgba(0, 102, 51, 0.25);
}

/* تحسين النصوص */
.s-block.s-block--categories .slide--cat-entry h2,
.s-block.s-block--categories.merge-with-top-component .slide--cat-entry h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    text-align: center;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.s-block.s-block--categories .slide--cat-entry:hover h2,
.s-block.s-block--categories.merge-with-top-component .slide--cat-entry:hover h2 {
    color: #006633;
    text-shadow: 0 1px 3px rgba(0, 102, 51, 0.2);
}

/* تحسين السلايدر */
.s-block.s-block--categories .s-slider-container,
.s-block.s-block--categories.merge-with-top-component .s-slider-container {
    padding: 10px 0; /* تقليل المساحة العلوية والسفلية */
    margin: 0 -10px;
}

.s-block.s-block--categories .swiper-wrapper,
.s-block.s-block--categories.merge-with-top-component .swiper-wrapper {
    align-items: stretch;
}

/* تأثيرات إضافية */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.s-block.s-block--categories .swiper-slide,
.s-block.s-block--categories.merge-with-top-component .swiper-slide {
    animation: slideInUp 0.6s ease-out forwards;
}

.s-block.s-block--categories .swiper-slide:nth-child(1),
.s-block.s-block--categories.merge-with-top-component .swiper-slide:nth-child(1) { animation-delay: 0.1s; }
.s-block.s-block--categories .swiper-slide:nth-child(2),
.s-block.s-block--categories.merge-with-top-component .swiper-slide:nth-child(2) { animation-delay: 0.2s; }
.s-block.s-block--categories .swiper-slide:nth-child(3),
.s-block.s-block--categories.merge-with-top-component .swiper-slide:nth-child(3) { animation-delay: 0.3s; }
.s-block.s-block--categories .swiper-slide:nth-child(4),
.s-block.s-block--categories.merge-with-top-component .swiper-slide:nth-child(4) { animation-delay: 0.4s; }
.s-block.s-block--categories .swiper-slide:nth-child(5),
.s-block.s-block--categories.merge-with-top-component .swiper-slide:nth-child(5) { animation-delay: 0.5s; }
.s-block.s-block--categories .swiper-slide:nth-child(6),
.s-block.s-block--categories.merge-with-top-component .swiper-slide:nth-child(6) { animation-delay: 0.6s; }

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .s-block.s-block--categories .s-slider-block__title,
    .s-block.s-block--categories.merge-with-top-component .s-slider-block__title {
        padding: 0; /* إزالة المساحة الجانبية */
        flex-direction: column;
        gap: 20px;
    }

    .s-block.s-block--categories .s-slider-block__title h2,
    .s-block.s-block--categories.merge-with-top-component .s-slider-block__title h2 {
        font-size: 1.8rem;
        padding: 0 20px;
    }

    .s-block.s-block--categories .s-slider-block__title h2::before,
    .s-block.s-block--categories .s-slider-block__title h2::after,
    .s-block.s-block--categories.merge-with-top-component .s-slider-block__title h2::before,
    .s-block.s-block--categories.merge-with-top-component .s-slider-block__title h2::after {
        width: 40px;
    }

    .s-block.s-block--categories .s-slider-block__title-nav,
    .s-block.s-block--categories .s-slider-block__title-nav--left,
    .s-block.s-block--categories.merge-with-top-component .s-slider-block__title-nav,
    .s-block.s-block--categories.merge-with-top-component .s-slider-block__title-nav--left {
        position: static !important;
        transform: none !important;
        justify-content: center;
        order: 1;
    }

    .s-block.s-block--categories .slide--cat-entry,
    .s-block.s-block--categories.merge-with-top-component .slide--cat-entry {
        padding: 25px 15px;
    }

    .s-block.s-block--categories .slide--cat-entry img,
    .s-block.s-block--categories.merge-with-top-component .slide--cat-entry img {
        width: 70px !important;
        height: 70px !important;
    }

    .s-block.s-block--categories .slide--cat-entry h2,
    .s-block.s-block--categories.merge-with-top-component .slide--cat-entry h2 {
        font-size: 1rem;
    }
}

/* تحسين الألوان للعلامة التجارية - هوية اليوم الوطني السعودي */
.s-block.s-block--categories .s-slider-wrapper,
.s-block.s-block--categories.merge-with-top-component .s-slider-wrapper {
    --brand-primary: #006633;
    --brand-secondary: #228B22;
    --brand-light: #90EE90;
    --brand-dark: #004d26;
    --background-white: #ffffff;
    --text-dark: #2c3e50;
    --light-gray: #f8f9fa;
}

/* إضافة تأثير التدرج للخلفية بالألوان السعودية */
.s-block.s-block--categories .slide--cat-entry::after,
.s-block.s-block--categories.merge-with-top-component .slide--cat-entry::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 102, 51, 0.02), rgba(34, 139, 34, 0.02));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px;
}

.s-block.s-block--categories .slide--cat-entry:hover::after,
.s-block.s-block--categories.merge-with-top-component .slide--cat-entry:hover::after {
    opacity: 1;
}

/* تأثيرات إضافية للون الأخضر السعودي */
.s-block.s-block--categories .slide--cat-entry:focus,
.s-block.s-block--categories .slide--cat-entry:active,
.s-block.s-block--categories.merge-with-top-component .slide--cat-entry:focus,
.s-block.s-block--categories.merge-with-top-component .slide--cat-entry:active {
    outline: 2px solid #006633;
    outline-offset: 2px;
}

/* تحسين تأثير الظلال بالألوان السعودية */
.s-block.s-block--categories .slide--cat-entry:hover,
.s-block.s-block--categories.merge-with-top-component .slide--cat-entry:hover {
    box-shadow: 0 15px 40px rgba(0, 102, 51, 0.15);
}

/* إضافة متغيرات CSS للاستخدام السهل داخل العناصر المحددة - هوية سعودية */
.s-block.s-block--categories,
.s-block.s-block--categories.merge-with-top-component {
    --saudi-brand-primary: #006633;
    --saudi-brand-secondary: #228B22;
    --saudi-brand-light: #90EE90;
    --saudi-brand-dark: #004d26;
    --saudi-background: #ffffff;
    --saudi-text: #2c3e50;
    --saudi-gray-light: #f8f9fa;
}

/* حل بديل: إخفاء الأزرار إذا كانت تسبب مشاكل */
.s-block.s-block--categories .s-slider-block__title-nav.hide-on-overlap,
.s-block.s-block--categories.merge-with-top-component .s-slider-block__title-nav.hide-on-overlap {
    display: none;
}

/* أو وضع الأزرار أسفل العنوان */
.s-block.s-block--categories .s-slider-block__title-nav.below-title,
.s-block.s-block--categories.merge-with-top-component .s-slider-block__title-nav.below-title {
    position: static !important;
    transform: none !important;
    justify-content: center;
    margin-top: 20px;
}

/* إضافة تأثيرات خاصة باليوم الوطني السعودي */
.s-block.s-block--categories::after,
.s-block.s-block--categories.merge-with-top-component::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #006633 0%, #228B22 50%, #006633 100%);
    z-index: 2;
    opacity: 0.8;
}

/* تأثير تموج للبطاقات عند التمرير */
.s-block.s-block--categories .slide--cat-entry:hover,
.s-block.s-block--categories.merge-with-top-component .slide--cat-entry:hover {
    animation: saudiPulse 0.6s ease-in-out;
}

@keyframes saudiPulse {
    0%, 100% {
        transform: translateY(-8px) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.02);
    }
}

/* إضافة نمط خاص للنص يعكس الهوية السعودية */
.s-block.s-block--categories .slide--cat-entry h2,
.s-block.s-block--categories.merge-with-top-component .slide--cat-entry h2 {
    font-family: 'Arial', 'Tahoma', sans-serif;
    letter-spacing: 0.5px;
}

/* تحسين الأزرار للمظهر السعودي */
.s-block.s-block--categories .s-slider-nav-arrow:hover:not(:disabled),
.s-block.s-block--categories.merge-with-top-component .s-slider-nav-arrow:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(0, 102, 51, 0.1), rgba(34, 139, 34, 0.1));
}

/* إضافة خط أخضر تحت العناوين عند التمرير */
.s-block.s-block--categories .slide--cat-entry:hover h2::after,
.s-block.s-block--categories.merge-with-top-component .slide--cat-entry:hover h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: #006633;
    border-radius: 1px;
}



/* إضافة شعار اليوم الوطني في الـ Navbar */
.flex.items-stretch.justify-between.relative::after {
  content: "";
  display: block;
  width: 60px;   /* عرض الشعار */
  height: 15px;  /* طول الشعار */
  background-image: url("https://cdn.salla.sa/vXYyYE/cd230a8f-016e-4e0b-97f6-868ae9eaf94f-1000x289.13443830571-RSWVgKnIGuN08US3Pg6ToBhyDgjXX5eWm1sxPUlg.png"); /* رابط شعار اليوم الوطني */
  background-size: contain;
  background-repeat: no-repeat;
  position: absolute;
  right: 13px;   /* المسافة من اليمين */
  top: 20%;
  transform: translateY(-50%); /* محاذاة عمودية في منتصف البار */
  z-index: 999; /* لتضمن ظهوره فوق العناصر */
}



/* الشعار في الديسكتوب */
.flex.items-center.justify-end::before {
  content: "";
  display: inline-block;
  width: 250px;
  height: 50px;
  margin-left: 15px; 
  background-image: url("https://cdn.salla.sa/vXYyYE/cd230a8f-016e-4e0b-97f6-868ae9eaf94f-1000x289.13443830571-RSWVgKnIGuN08US3Pg6ToBhyDgjXX5eWm1sxPUlg.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* نسخة الجوال - عرض أقل من 768px */
@media (max-width: 767px) {
  .flex.items-center.justify-end::before {
    width: 100px;   /* حجم أصغر للشعار */
    height: 60px;
    margin-left: 10px; /* تقليل المسافة عشان يكون مرتب */
  }
}