/* 1. استيراد الخطوط والإعدادات العامة */
@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700&family=Jost:wght@300;400;500&display=swap');

body, p, span, div, a, li, h1, h2, h3, h4, h5, h6, button, input, textarea, select, .product-details__desc, .product-entry__desc {
    font-family: 'Jost', 'Almarai', sans-serif !important;
    font-weight: 300 !important;
    letter-spacing: 0 !important;
}

/* توحيد الخلفيات (أبيض) */
.main-nav-container, main#main-content, .app-inner.flex.flex-col.min-h-full, .store-footer__inner, .bg-white, ul.main-menu.mm-spn--open, nav#mobile-menu, .s-comments.s-comments-product, .container--margined, .mm-ocd--open {
    background-color: #FFFFFF !important;
}
body, .s-block, main#main-content, .app-inner { background-color: #FFFFFF !important; }

/* 2. تحسين النصوص والأرقام */
.product-price, .s-product-card-price, .price, .total-price {
    font-family: 'Jost', sans-serif !important; letter-spacing: 1px !important; font-weight: 400 !important;
}
h1, h2, h3, h4, h5, h6, .product-title, .s-product-card-content-title { font-weight: 400 !important; letter-spacing: 0 !important; }
p, .product-description { line-height: 1.8 !important; }
p.ql-direction-rtl { text-align: center !important; line-height: 1.8 !important; font-size: 15px !important; }

/* 3. عناصر مخفية تماماً (Display None) */
.s-block__title, .s-search, .header-search, .site-header__search, .search-container, .top-navbar, .header-top, 
.s-user-menu-trigger, .s-user-menu-trigger *, .s-product-card-wishlist-btn, .btn--wishlist, .s-product-wishlist-btn, 
.product-brand, .brand-logo, .s-cart-summary-count, .s-cart-summary-total, form section.flex.bg-white.p-5, 
.s-reviews-testimonial__icon svg, .s-reviews-testimonial__avatar, 
a.flex.items-center.m-0, .md\:flex.items-center.justify-between.py-4.container.text-center, .moved-user-header img, 
.moved-user-header .s-avatar-img, .moved-user-item i, .moved-user-item svg, .moved-user-item::before {
    display: none !important;
}
/* عناصر مخفية بطرق أخرى (حسب كودك الأصلي) */
.s-user-menu-trigger::before, .s-user-menu-trigger::after { content: none !important; display: none !important; }
h1.s-reviews-header { font-size: 0px; } /* إخفاء حجم العنوان */

/* 4. الهيدر واللوقو */
.main-nav-container { min-height: 85px !important; padding: 10px 0 !important; }
.navbar-brand {
    position: absolute !important; left: 50% !important; top: 50% !important;
    transform: translate(-50%, -50%) !important; margin: 0 !important; z-index: 99 !important;
}
.navbar-brand img { max-height: 50px !important; width: auto !important; }

/* أيقونات الهيدر */
.sicon-menu::before, .header-btn__icon.sicon-menu::before {
    content: "" !important; display: block !important; width: 22px !important; height: 22px !important; margin: 0 auto !important;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3.75 9h16.5m-16.5 6.75h16.5' /%3E%3C/svg%3E") no-repeat center/contain !important;
}
.header-btn__icon.sicon-shopping-bag::before, .sicon-shopping-bag::before {
    content: "" !important; display: block !important; width: 20px !important; height: 20px !important; margin: 0 auto !important;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23272727'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15.75 10.5V6a3.75 3.75 0 1 0-7.5 0v4.5m11.356-1.993 1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 0 1-1.12-1.243l1.264-12A1.125 1.125 0 0 1 5.513 7.5h12.974c.576 0 1.059.435 1.119 1.007ZM8.625 10.5a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm7.5 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z' /%3E%3C/svg%3E") no-repeat center/contain !important;
}
.sicon-user-circle:before { content: "\f078"; font-size: initial; margin-left: -7px; }
.header-btn__icon.icon:where([dir=rtl],[dir=rtl] *), i.header-btn__icon.sicon-user-circle { margin-left: -10px; margin-right: -8px; border: none; }

/* 5. المنتجات والقوائم */
section.s-block.container { margin-top: 3.5rem; }
.s-products-list-wrapper.s-products-list-vertical-cards { margin-bottom: 2rem; gap: 6.625rem; grid-template-columns: repeat(1, 1fr) !important; padding: 65px 90px 0; }
.s-product-card-entry, .product-entry { background-color: transparent !important; border: none; }
.s-product-card-image-cover { object-fit: cover; background-color: #ffffff; }
#btn-show-more { display: table !important; margin: 10px auto !important; float: none !important; }

/* 6. التقييمات والسلايدر */
.s-reviews-testimonial { border-radius: 15px; background-color: #F9F8F6; }
.s-reviews-testimonial__text, .s-reviews-testimonial__name_wrapper { text-align: center; }
salla-rating-stars.hydrated { margin-right: 40px !important; }
a.s-reviews-display-all { margin-left: 20px !important; font-size: .875rem !important; opacity: 0.8 !important; color: #272727 !important; text-decoration: none !important; display: inline-block !important; }
.s-reviews-swiper-slide.swiper-slide.swiper-slide-active { border-radius: 20px; width: 90vw; padding: 0; }
.swiper.s-slider-container { margin-left: 20px !important; font-size: .875rem !important; opacity: 0.8 !important; }
.s-reviews-testimonials-slider .swiper:where([dir=rtl],[dir=rtl] *) { padding: 0; }

/* 7. أيقونات التواصل والمشاركة */
button.s-social-share-btn {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23272727'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15m0-3-3-3m0 0-3 3m3-3V15' /%3E%3C/svg%3E") no-repeat center/24px transparent !important;
    width: 40px !important; height: 40px !important; border: none !important; box-shadow: none !important;
}
button.s-social-share-btn svg, button.s-social-share-btn span { display: none !important; }
.s-social-share-list {
    display: flex !important; flex-direction: row !important; align-items: center !important; gap: 5px !important;
    position: absolute !important; top: 0 !important; right: 100% !important; left: auto !important; margin-right: 5px !important;
    width: max-content !important; background: transparent !important; box-shadow: none !important; border: none !important; padding: 0 !important;
}

/* تحويل السوشيال ميديا لنصوص */
ul.s-social-list, li.s-social-link {
    display: flex !important; flex-direction: row !important; width: auto !important; height: auto !important; gap: 25px !important;
    background: transparent !important; border: none !important; padding: 0 !important; margin: 0 !important; justify-content: center;
}
li.s-social-link a { width: auto !important; height: auto !important; background: transparent !important; border: none !important; text-decoration: none !important; display: flex !important; align-items: center; }
li.s-social-link a i, li.s-social-link a svg, li.s-social-link a::before { display: none !important; content: none !important; }
li.s-social-link a[href*="tiktok"]::after { content: "TikTok"; font-size: 14px !important; color: #888 !important; }
li.s-social-link a[href*="snapchat"]::after { content: "Snapchat"; font-size: 14px !important; color: #888 !important; }
li.s-social-link a[href*="twitter"]::after, li.s-social-link a[href*="x.com"]::after { content: "X"; font-size: 14px !important; color: #888 !important; }
li.s-social-link a[href*="instagram"]::after { content: "Instagram"; font-size: 14px !important; color: #888 !important; }

/* 8. الفوتر والأزرار */
.footer-is-light .store-footer .store-footer__inner { padding-bottom: 0; border: none; }
.container.grid.grid-col-1.lg\:grid-cols-6 { background-color: #fff; color: #272727; text-align: -webkit-center; }
.s-contacts-list-vertical { flex-direction: column; align-items: center; }
.s-contacts-icon:where([dir=rtl],[dir=rtl] *) { margin-left: 0.625rem; border: none; }
.footer-is-light .store-footer .contact-social { border: none; }
.s-button-primary-outline { background-color: #272727; color: #d9cdc2; }
.s-button-outline { border-color: #272727; }

/* 9. القائمة الجانبية (User Menu) */
ul.main-menu.mm-spn--open { padding-top: 25px; width: 100vw; }
.moved-user-header { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; padding-right: 20px !important; gap: 5px !important; }
.moved-user-header h3, .moved-user-header span, .moved-user-header p { margin: 0 !important; padding: 0 !important; width: auto !important; display: inline-block !important; font-size: 14px !important; line-height: 1 !important; }
.moved-user-header h3 { font-weight: bold !important; color: #272727 !important; }
.moved-user-header span { color: #888 !important; }
li.moved-user-item a { justify-content: flex-start !important; padding-right: 15px !important; gap: 5px !important; text-align: right !important; width: 100% !important; padding-top: 40px; }
li.moved-user-item a i, li.moved-user-item a svg { width: 25px !important; display: flex !important; justify-content: center !important; align-items: center !important; }

/* 10. زر الإغلاق السحري */
#my-magic-close-btn {
    position: fixed !important; top: 21px !important; right: -1px !important; z-index: 2147483647 !important;
    display: none; opacity: 0; transform: scale(0.5); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 45px; height: 45px; background: transparent; border-radius: 50%; cursor: pointer; align-items: center; justify-content: center;
}
#my-magic-close-btn svg { width: 28px; height: 28px; stroke: #272727; stroke-width: 1px !important; }
#my-magic-close-btn.show-now { display: flex !important; opacity: 1 !important; transform: scale(1) !important; }

/* 11. إعدادات الجوال (Media Queries) */
@media only screen and (max-width: 1024px) {
    .mm-spn li a, .mm-spn li>span { align-items: center; display: flex; padding-top: 60px; justify-content: center; }
    .mm-spn.mm-spn--navbar.mm-spn--main:where([dir=rtl],[dir=rtl] *):after, .mm-spn.mm-spn--navbar ul:before, .s-user-menu-dropdown-header-close svg { display: none; }
}
@media (max-width: 640px) {
    .is-sticky-product-bar .sticky-product-bar {
        bottom: 0px; display: flex; left: 4px; position: fixed; width: 98.5%; z-index: 2; --tw-translate-y: 28rem;
        align-items: center; flex-direction: column; flex-wrap: wrap; gap: 1.625rem; justify-content: space-between; opacity: 0; padding: 0.75rem;
    }
    .hydrated .is-sticky-product-bar .sticky-product-bar, .hydrated .is-sticky-product-bar .sticky-product-bar salla-add-product-button, .hydrated .is-sticky-product-bar .sticky-product-bar__quantity {
        --tw-translate-y: 0px; opacity: 1; background-color: #F9F8F6 !important; color: #272727 !important;
    }
    .is-sticky-product-bar .sticky-product-bar__quantity salla-quantity-input .s-quantity-input-input, .s-quantity-input-container {
        width: 70%; background-color: #F9F8F6; border-color: #D9CDC2;
    }
    .s-quantity-input-button { fill: #272727; }
    .s-button-primary { background-color: #272727; border-color: #272727; color: #D9CDC2; display: none !important; }
}

/* 12. إصلاح نهائي لزر الإغلاق الأحمر (مضاف حديثاً) */
button.close-mobile-menu,
.mobile-menu__close,
.mm-spn--close,
.s-user-menu-close,
#close-mobile-menu {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
    background: transparent !important; /* لإزالة اللون الأحمر */
    border: none !important;
}

/* تنظيف إضافي للعناصر الزائفة التي قد تحمل أيقونة الإكس */
.mobile-menu__close::before,
.mobile-menu__close::after,
.mm-spn--close::before,
.mm-spn--close::after {
    content: none !important;
    display: none !important;
}