/* Add custom CSS styles below */ 
.carousel-slider .swiper:where([dir=rtl],[dir=rtl] *), salla-slider[type]:not(.hydrated) .swiper>div>div:where([dir=rtl],[dir=rtl] *), salla-slider[type]:not(.hydrated)>div:where([dir=rtl],[dir=rtl] *) {
padding-left: unset !important; 
}


@media (max-width: 768px) {
 .s-slider-block__title > div.s-slider-block__title-left{
	display: none !important;
}
.s-slider-block__title {
display: flex !important;
align-items: center !important;
justify-content: center !important;
margin: auto !important;
text-align: text !important;
}
.s-slider-block__title div ,  .s-slider-block__title h2{
margin: auto !important;
text-align: text !important;
padding: 0 !important;
}
}.s-product-card-content .s-product-card-add-to-cart-mobile  salla-add-product-button   salla-button  button{
	background: black !important;
	color: white !important;
}@media only screen and (max-width: 1024px) {
    .mm-spn li img  , .mm-spn a  img {
    	width: 5rem !important;
    	height: 5rem !important;
    	border-radius: 0 !important;
    	padding: 0 !important;
    	object-fit: cover !important;
    	background-size: cover !important;
    	max-width: 5rem !important;
    	max-height: 5rem !important;
    }
}

    (function() {
    const style = document.createElement('style');
    style.innerHTML = `
        .s-product-card-image, .product-single-image-wrapper, .abayat-sidebar { 
            position: relative !important; 
        }

        .s-product-card-entry .s-product-card-image .s-product-card-promotion-title,
        .abayat-sidebar .promotion-title {
            all: unset !important;
            position: absolute !important;
            top: 0px !important;
            z-index: 10 !important;
            writing-mode: vertical-rl !important;
            text-orientation: mixed !important;
            text-align: center !important;
            display: flex !important;
            align-items: center !important;
            justify-content: flex-start !important;
            color: #fff !important;
            background-color: var(--color-promotion-title-card) !important;
            box-sizing: border-box !important;
            overflow: hidden !important;
        }

        .s-product-card-entry .s-product-card-image .s-product-card-promotion-title {
            right: 10px !important;
            width: 32px !important;
            min-height: 95px !important;
            padding: 15px 0 25px 0 !important;
            font-size: 11px !important;
            font-weight: 600 !important;
            clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 50% 90%, 0% 100%) !important;
        }

        .abayat-sidebar .promotion-title {
            right: 15px !important;
            width: 38px !important;
            min-height: 115px !important;
            padding: 20px 0 30px 0 !important;
            font-size: 13px !important;
            font-weight: 700 !important;
            clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 50% 92%, 0% 100%) !important;
        }

        /* تعديل النقش ليكون مربعات مائلة (Diamond Pattern) */
        .s-product-card-promotion-title::after, .promotion-title::after {
            content: "" !important;
            position: absolute !important;
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            z-index: -1 !important;
            pointer-events: none !important;
            
            /* نقش المربعات الهندسية */
            background-image: 
                linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.15) 75%),
                linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.15) 75%) !important;
            background-position: 0 0, 7px 7px !important;
            background-size: 14px 14px !important;
            
            opacity: 1 !important;
            display: block !important;
        }
    `;
    document.head.appendChild(style);

    function moveElements() {
        document.querySelectorAll('.s-product-card-entry').forEach(card => {
            const promo = card.querySelector('.s-product-card-promotion-title');
            const imgContainer = card.querySelector('.s-product-card-image');
            if (promo && imgContainer && promo.parentElement !== imgContainer) {
                imgContainer.appendChild(promo);
            }
        });

        const sidebar = document.querySelector('.swiper.s-slider-container.swiper-initialized');
        if (sidebar) {
            const innerPromo = sidebar.querySelector('.promotion-title');
            const innerImg = sidebar.querySelector('.product-single-image-wrapper') || sidebar;
            if (innerPromo && innerImg && innerPromo.parentElement !== innerImg) {
                innerImg.appendChild(innerPromo);
            }
        }
    }

    const observer = new MutationObserver(() => moveElements());
    observer.observe(document.body, { childList: true, subtree: true });
    moveElements();
})();