/* 1. الأساسيات والأسعار (ممنوع اللمس لأنها حلت مشكلة السعر) */
:root {
  --color-primary: #5E36B2 !important;
  --color-primary-dark: #4a2e91 !important;
  --color-primary-light: #7b5fd1 !important;
  --color-primary-reverse: #FEA928 !important;
}

.s-product-card-price, 
.s-product-card-price-main, 
.s-product-card-content-footer b, 
[data-product-price], 
.price, 
b.text-sm {
    color: #FEA928 !important; 
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 18px !important;
    font-weight: 800 !important;
}

/* 2. استعادة حركة الخلفية المتدرجة */
body {
  background: linear-gradient(270deg, #5E36B2, #FEA928, #5E36B2);
  background-size: 600% 600%;
  animation: purpleGoldGradient 15s ease infinite;
}
@keyframes purpleGoldGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 3. استعادة تصميم البنرات الاحترافي */
.s-block.s-block--banners > .grid .banner-entry {
  position: relative;
  border-radius: 20px !important;
  overflow: hidden !important;
  padding: 2px;
  background: linear-gradient(135deg, #ff00ff, #7a007a, #ffccff);
  background-size: 400% 400%;
  animation: borderShift 6s ease infinite;
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}
@keyframes borderShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 4. استعادة حركة شعار المتجر (Heartbeat) */
.navbar-brand {
  animation: heartbeat 2.5s ease-in-out infinite both;
}
@keyframes heartbeat {
  0%, 45%, 100% { transform: scale(1); }
  10% { transform: scale(0.91); }
  17% { transform: scale(0.98); }
  33% { transform: scale(0.87); }
}

/* 5. استعادة تنسيق الفوتر */
footer.store-footer {
    background-color: var(--color-primary-reverse) !important;
    border-radius: 20px;
    margin: 15px;
    color: #fff !important;
}
footer.store-footer * { color: #fff !important; }


/* --- تعديل البنر العلوي (Navbar) حبة حبة --- */

/* 1. تطبيق التدرج اللوني والحركة */
.top-navbar, 
#mainnav, 
.main-nav-container, 
header.p-0 {
    background: linear-gradient(270deg, #5E36B2, #FEA928, #5E36B2) !important;
    background-size: 400% 400% !important;
    animation: purpleGoldGradient 10s ease infinite !important; /* نفس حركة الخلفية */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* 2. تلوين الأيقونات والنصوص في البار العلوي للأبيض عشان توضح */
.main-menu li a, 
.header-btn__text, 
.s-search-input-wrapper i,
.header-btn__icon,
span.s-cart-summary-count {
    color: #ffffff !important;
}

/* 3. تنسيق شريط البحث ليتناسب مع التموج */
.s-search-input {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

/* --- الحل الشامل للجوال والكمبيوتر (3 في الصف) --- */

/* 1. إجبار الحاوية على التوزيع الثلاثي في كل الشاشات */
div.grid.two-row.grid-flow-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* فرض 3 أعمدة */
    gap: 8px !important; /* مسافة بسيطة بين العناصر */
    width: 100% !important;
}

/* 2. إجبار الصورة على ملء المساحة (عشان تروح المنطقة البنفسجية) */
div.grid.two-row.grid-flow-row .lazy__bg {
    background-size: cover !important; /* الصورة تملا المربع كامل */
    background-position: center !important;
    aspect-ratio: 1 / 1 !important; /* يحافظ على شكل المربع */
    width: 100% !important;
    height: 100% !important;
}

/* 3. تنسيق البرواز المموج لكل عنصر */
.banner-entry {
    position: relative;
    border-radius: 12px !important; /* حواف أنعم للجوال */
    overflow: hidden !important;
    padding: 2px;
    background: linear-gradient(135deg, #ff00ff, #7a007a, #ffccff);
    background-size: 400% 400%;
    animation: borderShift 6s ease infinite;
    display: block !important;
}

@keyframes borderShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* 1. إجبار التوزيع الثلاثي للأقسام والبنرات في الكمبيوتر */
@media (min-width: 1024px) {
    div.grid.two-row.grid-flow-row {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
        perspective: 1000px; /* لإعطاء عمق للحركة */
    }
}

/* 2. الحالة الافتراضية للعنصر (مختفي ومتشقلب) */
div.grid.two-row.grid-flow-row a.banner-entry {
    opacity: 0;
    transform: rotateX(-70deg) translateY(50px); /* تشقلب لأسفل */
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    display: block;
}

/* 3. الحالة عند ظهور العنصر (is-visible) التي يفعلها السكربت */
div.grid.two-row.grid-flow-row a.banner-entry.is-visible {
    opacity: 1;
    transform: rotateX(0deg) translateY(0); /* العودة للوضع الطبيعي */
}

/* 4. لمسة إضافية عند مرور الماوس (Hover) */
div.grid.two-row.grid-flow-row a.banner-entry:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3) !important;
    z-index: 10;
}

/* --- الحل النهائي المباشر لمتجر الكرت الذكي --- */

@media (min-width: 1024px) {
    /* 1. توزيع العناصر 3 في الصف ومنع اختفائها */
    .s-block--banners div.grid {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        height: auto !important;
        gap: 20px !important;
    }

    /* 2. إلغاء نظام "المربع الإجباري" المسبب للتمطط */
    .banner-entry.square-photos {
        width: 30% !important; /* 3 أعمدة */
        padding-top: 0 !important; /* إلغاء التمطط */
        height: 200px !important; /* ارتفاع ثابت يضمن الوضوح */
        position: relative !important;
        display: block !important;
    }

    /* 3. إجبار صورة البطاقة على الظهور كاملة (contain) */
    .banner-entry.square-photos .lazy__bg {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background-size: contain !important; /* يمنع القص والتمطط */
        background-position: center !important;
        background-repeat: no-repeat !important;
        /* هذا السطر يمنع سلة من فرض مقاساتها */
        padding-bottom: 0 !important; 
    }
}

/* حل لمشكلة ظهور الصور كـ "خطوط" في بعض الأحيان */
.lazy__bg:not(.loaded) {
    min-height: 200px;
}

/* --- كود السيطرة الشاملة واللون الأبيض الناصع --- */

/* 1. الخلفية المعتمدة بالتدرج العرضي */
.mobile-menu.mm-spn, 
.mobile-menu.mm-spn ul, 
.mm-spn__panel {
    background: #000000 !important;
    background-image: linear-gradient(90deg, #666666 0%, #000000 100%) !important;
}

/* 2. الهجوم الشامل: إجبار (أي نص) داخل القائمة على الأبيض الصريح */
.mobile-menu.mm-spn *, 
.mm-spn__title, 
.mm-spn--navbar {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important; /* إزالة أي بهتان في اللون */
    fill: #ffffff !important; /* للأيقونات */
    font-weight: bold !important;
}

/* 3. إظهار "القائمة الرئيسية" بوضوح فائق */
.mm-spn__title {
    display: block !important;
    visibility: visible !important;
    text-align: center !important;
}

/* 4. سهم الرجوع والأسهم الجانبية (أبيض ناصع) */
.mm-spn__btn--back::before, 
.mm-spn__btn--back::after,
.mm-spn__next::after {
    border-color: #ffffff !important;
    opacity: 1 !important;
}

/* 5. شريط العنوان: شفاف عشان ما يغطي على التدرج */
.mm-spn--navbar {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* --- كود الزجاج المكثف (Frosted Glass) لبطاقة المنتج --- */

.s-product-card-entry {
    /* 1. زيادة كثافة اللون الأبيض (من 0.4 إلى 0.7) لعزل أقوى */
    background: rgba(255, 255, 255, 0.7) !important; 
    
    /* 2. تقوية التغبيش لعزل التموجات الخلفية تماماً */
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    
    /* 3. حدود أبيض ناصع نحيفة تعطي شكل "إطار الكرت" */
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    
    border-radius: 20px !important;
    padding: 15px !important;
    
    /* 4. ظل أنعم وأثقل يعطي ثبات للبطاقة */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* 5. إبراز النصوص بحدة عالية */
.s-product-card-content-title a {
    color: #000000 !important;
    font-weight: 900 !important; /* خط أعرض للوضوح */
}

.s-product-card-sale-price h4 {
    color: #2d3436 !important;
    font-size: 1.1rem !important;
}

/* 6. حركة تفاعلية فخمة عند اللمس */
.s-product-card-entry:hover {
    background: rgba(255, 255, 255, 0.85) !important;
    transform: scale(1.02) !important; /* تكبير بسيط جداً */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

/* 7. ضمان ظهور صورة المنتج بألوانها الأصلية القوية */
.s-product-card-image img {
    filter: contrast(1.05) brightness(1.02) !important;
}

/* --- كود الفوتر الزجاجي ثري دي (بدون أحمر) --- */

.store-footer__inner {
    /* 1. الخلفية: تدرج زجاجي ملكي غامق (أسود وذهبي) */
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.85) 0%, 
        rgba(30, 30, 30, 0.75) 50%, 
        rgba(138, 109, 41, 0.55) 100%) !important;
    
    /* 2. تأثير التغبيش القوي للزجاج */
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    
    /* 3. الحدود المشعة الشفافة (الإضاءة الداخلية) */
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 
        inset 0 0 15px rgba(255, 255, 255, 0.1), /* توهج داخلي خفيف */
        0 15px 35px rgba(0, 0, 0, 0.7);       /* ظل أسود ثري دي خارجي */
    
    /* 4. ضبط الشكل العام */
    border-radius: 25px !important;
    padding: 45px 25px !important;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease-in-out !important; /* حركة بسيطة عند التمرير */
}

/* حركة بسيطة ثري دي عند مرور الماوس (اختياري) */
.store-footer__inner:hover {
    transform: translateY(-5px) !important;
    box-shadow: 
        inset 0 0 20px rgba(255, 255, 255, 0.2), 
        0 20px 50px rgba(0, 0, 0, 0.8);
}

/* ضمان أن كل الخطوط تظل بيضاء وواضحة جداً */
.store-footer__inner h3, 
.store-footer__inner p, 
.store-footer__inner a, 
.store-footer__inner span,
.store-footer__inner .unicode,
.store-footer__inner .s-contacts-item,
.store-footer__inner .s-trust-badges-label,
.store-footer__inner .s-trust-badges-number {
    color: #ffffff !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7) !important;
}

/* الأيقونات بالأبيض */
.store-footer__inner svg path,
.store-footer__inner .s-social-icon svg,
.store-footer__inner .s-contacts-icon svg,
.store-footer__inner .s-contacts-item i {
    fill: #ffffff !important;
    color: #ffffff !important;
}

/* وثيقة العمل الحر بشكل متناسق */
.s-trust-badges-wrapper {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    padding: 10px !important;
}

/* --- تنسيق مميزات المتجر: تأثير زجاجي ثري دي --- */

/* 1. تنسيق البطاقة الرئيسية (العنصر) */
.s-block--features__item {
    /* الخلفية الزجاجية الداكنة */
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.8) 0%, 
        rgba(30, 30, 30, 0.7) 50%, 
        rgba(138, 109, 41, 0.4) 100%) !important;
    
    /* تأثير التغبيش */
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    
    /* الحدود المشعة والظل الثري دي */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 
        inset 0 0 10px rgba(255, 255, 255, 0.05), 
        0 10px 30px rgba(0, 0, 0, 0.6) !important;
    
    /* ضبط الحواف والمسافات */
    border-radius: 20px !important;
    padding: 30px 20px !important;
    text-align: center;
    transition: all 0.3s ease-in-out !important;
}

/* 2. تأثير الرفع (Hover) عند مرور الماوس */
.s-block--features__item:hover {
    transform: translateY(-8px) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    box-shadow: 
        inset 0 0 15px rgba(255, 255, 255, 0.15), 
        0 20px 40px rgba(0, 0, 0, 0.8) !important;
}

/* 3. تنسيق الأيقونة */
.feature-icon i {
    color: #ffffff !important;
    font-size: 32px !important;
    margin-bottom: 15px;
    display: inline-block;
    /* توهج خفيف للأيقونة */
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

/* 4. تنسيق العناوين (النصوص البيضاء) */
.s-block--features__item h2 {
    color: #ffffff !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    margin-top: 15px !important;
    margin-bottom: 10px !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8) !important;
}

/* 5. تنسيق الوصف */
.s-block--features__item p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
}

/* ضبط المسافات بين البطاقات */
.grid.gap-4 {
    padding: 20px 0 !important;
}

/* --- تنسيق عنوان آراء العملاء الرئيسي --- */

.s-reviews-header {
    /* 1. النص: أبيض ناصع وبارز */
    color: #ffffff !important;
    font-size: 2rem !important;
    font-weight: bold !important;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    /* 2. الخلفية: مستطيلة داكنة بحدود مستديرة */
    background: linear-gradient(90deg, 
        rgba(0, 0, 0, 0) 0%, 
        rgba(20, 20, 20, 0.8) 50%, 
        rgba(0, 0, 0, 0) 100%) !important;
    
    /* 3. الحدود والظل (التوهج الخلفي) */
    padding: 15px 40px !important;
    border-radius: 50px !important; /* حواف دائرية انسيابية */
    border-bottom: 2px solid rgba(255, 255, 255, 0.1) !important;
    
    /* ظل خلفي مشع ليعطي أبعاد ثري دي */
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5) !important;
    
    margin-bottom: 40px !important;
    display: table !important; /* لجعل الخلفية على مقاس النص */
    margin-left: auto !important;
    margin-right: auto !important;
}

/* إضافة خط مشع بسيط تحت العنوان لزيادة الفخامة */
.s-reviews-header::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #ffffff;
    margin: 10px auto 0;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* --- تصفير الخلفيات البيضاء وتثبيت النمط الزجاجي --- */

/* 1. إزالة أي خلفية بيضاء من العناصر المحيطة */
.s-reviews-swiper-slide, 
.s-reviews-testimonial, 
.swiper-slide {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
}

/* 2. البطاقة الزجاجية (العنصر الأساسي فقط) */
.s-reviews-testimonial__inner {
    /* الخلفية الملكية الغامقة */
    background: linear-gradient(135deg, 
        rgba(15, 15, 15, 0.92) 0%, 
        rgba(35, 35, 35, 0.85) 100%) !important;
    
    /* التأثير الزجاجي والحدود */
    border-radius: 25px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    
    /* الظل المشع والثري دي */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 
                inset 0 0 10px rgba(255, 255, 255, 0.05) !important;
    
    padding: 30px !important;
    margin: 10px !important; /* مسافة بسيطة بين البطاقات */
}

/* 3. ضمان ظهور النصوص باللون الأبيض بالكامل */
.s-reviews-testimonial__text p, 
.s-reviews-testimonial__info h2,
.s-reviews-testimonial__name_wrapper h2 {
    color: #ffffff !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9) !important;
}

/* 4. تنسيق النجوم والتقييم */
.s-rating-stars-selected svg {
    fill: #ffcc00 !important;
    filter: drop-shadow(0 0 5px rgba(255, 204, 0, 0.5));
}

/* 5. أيقونة الاقتباس */
.s-reviews-testimonial__icon svg {
    fill: rgba(255, 255, 255, 0.15) !important;
}



/* --- نقل بطاقة المطور لأسفل ذيل الصفحة --- */

/* 1. إخفاء الرابط الأصلي تماماً */
p.text-gray-400.mb-2\.5 a[href*="smart.com"] {
    display: none !important;
}

/* 2. إنشاء سطر جديد أسفل الحقوق للبطاقة */
p.text-gray-400.mb-2\.5::after {
    content: "برمجة وتطوير / ذيب" !important;
    display: block !important; /* وضعها في سطر منفصل */
    width: fit-content !important;
    margin: 15px auto 0 !important; /* توسيط ومسافة علوية */
    
    /* التصميم الزجاجي الفخم */
    background: rgba(0, 0, 0, 0.75) !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: bold !important;
    padding: 5px 20px !important;
    border-radius: 50px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    
    /* تأثير الظل */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* 3. تنسيق نص الحقوق ليكون بسيطاً في السطر العلوي */
p.text-gray-400.mb-2\.5 {
    display: block !important;
    text-align: center !important;
    color: #ffffff !important;
    font-size: 13px !important;
    margin-top: 20px !important;
}