/* 1. إعدادات الصفحة والخلفية المتغيرة */
body {
    margin: 0;
    background: linear-gradient(-45deg, #ffffff, #e3f2fd, #ffffff, #d1e9ff);
    background-size: 400% 400%;
    animation: fastGradient 10s ease infinite !important;
    background-attachment: fixed;
    overflow-x: hidden;
}

/* 2. طبقة النجوم واسم المتجر (حركة الانزلاق) */
body::before {
    content: "★ 3DD ★ 3DD ★ 3DD ★ 3DD ★ 3DD ★";
    position: fixed;
    top: -10%; left: -10%; width: 120%; height: 120%;
    color: #007bff;
    font-size: 50px;
    font-weight: 900;
    word-spacing: 150px;
    line-height: 200px;
    z-index: -1;
    opacity: 0.1;
    animation: hyperSpace 15s linear infinite;
    white-space: nowrap;
}

/* 3. كروت المنتجات - توحيد مقاسات الصور (تم دمج المكرر وتثبيت الـ Aspect Ratio) */
salla-product-card .image-wrapper, 
.s-product-card-image, 
.product-item__image,
.s-product-card-entry .s-product-card-image {
    width: 100% !important;
    aspect-ratio: 3 / 4 !important;
    overflow: hidden !important;
    border-radius: 15px !important;
    display: block !important;
    position: relative !important;
    background-color: #f9f9f9 !important;
}

salla-product-card img, 
.s-product-card-image img, 
.product-item__image img,
.s-product-card-entry img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.5s ease !important;
}

salla-product-card:hover img {
    transform: scale(1.1) !important;
}

/* 4. تنسيق المنتجات غير المتوفرة (إطار أحمر + خلفية حمراء) */
salla-product-card:has(button[disabled]),
salla-product-card:has(.out-of-stock),
.s-product-card-entry:has(button[disabled]),
.s-product-card-entry:has(.out-of-stock) {
    border: 3.5px solid #ff0000 !important;
    background-color: rgba(255, 0, 0, 0.15) !important;
    backdrop-filter: blur(5px) !important;
    border-radius: 20px !important;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
    animation: none !important;
}

salla-badge.out-of-stock, .badge--out-of-stock {
    background-color: #ff0000 !important;
    color: #ffffff !important;
    font-weight: bold !important;
    border-radius: 8px !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2) !important;
    padding: 2px 8px !important;
}

salla-product-card:has(button[disabled]):hover,
salla-product-card:has(.out-of-stock):hover {
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.6) !important;
    border-color: #ff3333 !important;
}

/* 5. تنسيق أزرار المنتجات المخلصة */
salla-product-card:has(button[disabled]) salla-add-product-button button,
salla-product-card:has(.out-of-stock) salla-add-product-button button,
button[disabled] {
    background: #cc0000 !important;
    color: #ffffff !important;
    border: none !important;
    animation: none !important;
    opacity: 1 !important;
}

/* 6. تنسيق المنتجات المتوفرة (إطار سماوي نابض) */
salla-product-card:not(:has(button[disabled])):not(:has(.out-of-stock)),
.s-product-card-entry:not(:has(button[disabled])):not(:has(.out-of-stock)) {
    border: 3px solid #00d4ff !important;
    background-color: rgba(0, 212, 255, 0.08) !important;
    backdrop-filter: blur(5px) !important;
    border-radius: 20px !important;
    animation: availablePulse 3s infinite ease-in-out !important;
    transition: all 0.3s ease-in-out !important;
}

salla-product-card:not(:has(button[disabled])):not(:has(.out-of-stock)):hover,
.s-product-card-entry:not(:has(button[disabled])):not(:has(.out-of-stock)):hover {
    transform: translateY(-5px) !important;
    border-color: #00ffcc !important;
    background-color: rgba(0, 212, 255, 0.15) !important;
    box-shadow: 0 0 35px rgba(0, 212, 255, 0.8) !important;
}

/* 7. أزرار إضافة للسلة واللمعة المضيئة */
salla-add-product-button button, .s-add-to-cart-button, .btn--add-to-cart {
    position: relative !important;
    overflow: hidden !important;
    background: linear-gradient(90deg, #007bff, #00d4ff, #007bff) !important;
    background-size: 200% auto !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    transition: 0.3s !important;
}

salla-add-product-button button span, .s-add-to-cart-button span {
    display: inline-block !important;
    animation: textWobble 2s infinite ease-in-out !important;
}

salla-add-product-button button::after, .s-add-to-cart-button::after {
    content: "" !important;
    position: absolute !important;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent) !important;
    transform: skewX(-20deg) !important;
    animation: buttonShine 3s infinite !important;
}

/* 8. تنسيق عناوين الأقسام والخط المتوهج */
.s-block__header, .s-block__title, .section-title {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    margin: 50px auto !important;
    gap: 15px !important;
}

.s-block__title-text, .s-block__title h2 {
    font-size: 34px !important;
    font-weight: 900 !important;
    color: #007bff !important;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.3) !important;
}

.s-block__header::after, .s-block__title::after, .section-title::after {
    content: "" !important;
    display: block !important;
    width: 80% !important;
    max-width: 600px !important;
    height: 4px !important;
    background: linear-gradient(90deg, transparent, #00d4ff, #ffffff, #00d4ff, transparent) !important;
    background-size: 200% 100% !important;
    box-shadow: 0 0 15px #00d4ff !important;
    border-radius: 50px !important;
    animation: lineFlow 3s linear infinite !important;
}

/* 9. جميع الحركات (Animations) مجمعة للسرعة */
@keyframes availablePulse {
    0% { box-shadow: 0 0 10px rgba(0, 212, 255, 0.3); border-color: #00d4ff; }
    50% { box-shadow: 0 0 25px rgba(0, 212, 255, 0.7); border-color: #ffffff; }
    100% { box-shadow: 0 0 10px rgba(0, 212, 255, 0.3); border-color: #00d4ff; }
}
@keyframes lineFlow { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes fastGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes hyperSpace { 0% { transform: translate(0, 0); } 100% { transform: translate(-300px, 300px); } }
@keyframes textWobble { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes buttonShine { 0% { left: -100%; } 100% { left: 100%; } }












/* --------------------------------------------------- */
/* العنوان الترويجي - متوازن: صغير، واضح، ولا يغطي الصور */
/* --------------------------------------------------- */

.s-product-card-promotion-title, 
.promotion-title, 
.s-badge-promotion {
    position: absolute !important;
    top: auto !important;
    bottom: 8px !important; /* قريب من الحافة عشان ما يزحم الصورة */
    right: 8px !important;
    left: auto !important;
    
    /* تصميم ناعم وصغير */
    background: rgba(220, 20, 60, 0.7) !important; /* أحمر صريح وواضح */
    backdrop-filter: blur(5px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.4) !important; /* توهج أحمر بسيط للجذب */
    
    /* تنسيق النص (صغير ومركز) */
    color: #ffffff !important;
    font-size: 10px !important; /* حجم صغير ومرتب */
    font-weight: 900 !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    
    /* ضمان الظهور */
    z-index: 10 !important;
    display: inline-block !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5) !important;
    pointer-events: none !important; /* عشان ما يعيق الضغط على المنتج */
    transition: all 0.3s ease !important;
}

/* تأثير اللمعة (Shine) - لإعطائه حيوية بدون إزعاج */
.s-product-card-promotion-title::after {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: promoShine 5s infinite;
}

@keyframes promoShine {
    0% { left: -100%; }
    15% { left: 150%; }
    100% { left: 150%; }
}

/* عند تمرير الماوس على المنتج */
salla-product-card:hover .s-product-card-promotion-title {
    background: #ff0000 !important; /* يصير أحمر فاقع */
    transform: scale(1.1) !important; /* يكبر شوي عشان يقرأه العميل بوضوح */
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.8) !important;
}












/* --------------------------------------------------- */
/* شريط الإعلان العلوي (ثابت Sticky) - يتبع العميل وين ما راح */
/* --------------------------------------------------- */

.s-header__announcement-bar, 
.announcement-bar,
header::before {
    content: "🚀 وصلت للمتجر الصح! تسليم فوري في نفس اللحظة.. هدفنا رضاك التام ✅" !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(90deg, #007bff, #00d4ff, #007bff) !important;
    background-size: 200% auto !important;
    animation: barFlow 3s linear infinite !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    text-align: center !important;
    font-size: 14px !important;
    min-height: 40px !important;
    width: 100% !important;
    
    /* تثبيت الشريط في الأعلى */
    position: fixed !important; /* هذا السطر هو اللي يثبته */
    top: 0 !important;
    left: 0 !important;
    z-index: 99999 !important; /* رفعه فوق كل عناصر المتجر */
    
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.5) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
}

/* إضافة مسافة للهيدر عشان ما يختفي تحت الشريط المثبت */
body {
    padding-top: 40px !important; /* نفس ارتفاع الشريط تقريباً */
}

/* لمعة الشريط المتحركة */
header::after {
    content: "" !important;
    position: fixed !important;
    top: 0;
    left: -100%;
    width: 30%;
    height: 40px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent) !important;
    transform: skewX(-25deg) !important;
    animation: barShine 4s infinite !important;
    z-index: 100000 !important;
}

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

@keyframes barShine {
    0% { left: -100%; }
    30% { left: 150%; }
    100% { left: 150%; }
}

/* تعديلات الجوال لضمان التثبيت وسهولة القراءة */
@media (max-width: 767px) {
    .s-header__announcement-bar, header::before {
        font-size: 11px !important;
        min-height: 35px !important;
        padding: 0 10px !important;
    }
    body {
        padding-top: 35px !important;
    }
}











/* --------------------------------------------------- */
/* 1. السناب والتيك توك (جهة اليمين) - زجاجي شفاف */
/* --------------------------------------------------- */

/* السناب شات */
[href*="snapchat.com"] {
    position: fixed !important;
    bottom: 60px !important;
    right: 20px !important;
    width: 55px !important;
    height: 55px !important;
    background: rgba(255, 252, 0, 0.4) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    animation: socialPulse 2s infinite ease-in-out !important;
}
[href*="snapchat.com"]::before { content: "👻" !important; font-size: 28px !important; }

/* التيك توك */
[href*="tiktok.com"] {
    position: fixed !important;
    bottom: 60px !important;
    right: 85px !important;
    width: 55px !important;
    height: 55px !important;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="white" d="M448 209.91a210.06 210.06 0 0 1-122.77-39.25V349.38A162.55 162.55 0 1 1 185 188.31V278.2a74.62 74.62 0 1 0 52.23 71.18V0l88 0a121.18 121.18 0 0 0 1.86 22.17A122.18 122.18 0 0 0 381 102.39a121.4 121.4 0 0 0 67 20.14z"/></svg>') !important;
    background-size: 50% !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    color: transparent !important;
    animation: socialPulse 2s infinite ease-in-out 0.5s !important;
}

/* --------------------------------------------------- */
/* 2. الواتساب (جهة اليسار) - زجاجي شفاف + سماعة بيضاء */
/* --------------------------------------------------- */

[href*="wa.me"], [href*="whatsapp.com"] {
    position: fixed !important;
    bottom: 60px !important;
    left: 20px !important;
    width: 55px !important;
    height: 55px !important;
    background: rgba(37, 211, 102, 0.4) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    overflow: visible !important;
    animation: socialPulse 2s infinite ease-in-out !important;
}
/* السماعة البيضاء */
[href*="wa.me"]::before, [href*="whatsapp.com"]::before {
    content: "📞" !important;
    font-size: 25px !important;
    filter: brightness(0) invert(1) !important;
}

/* --------------------------------------------------- */
/* 3. توضيح الكلمات (تنورونا ✨ يمين) و (للتواصل ✨ يسار) */
/* --------------------------------------------------- */

/* كلمة تنورونا */
body::after {
    content: "تنورونا ✨" !important;
    position: fixed !important;
    bottom: 25px !important;
    right: 50px !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    font-size: 15px !important;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0px 0px 15px #00d4ff !important;
    z-index: 999999 !important;
}

/* كلمة للتواصل */
[href*="wa.me"]::after, [href*="whatsapp.com"]::after {
    content: "للتواصل ✨" !important;
    position: absolute !important;
    bottom: -35px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    white-space: nowrap !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    font-size: 15px !important;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0px 0px 15px #00d4ff !important;
}

/* تنظيف وتنظيم */
[href*="snapchat.com"]::after, [href*="snapchat.com"] span, [href*="tiktok.com"] span, [href*="wa.me"] span { display: none !important; }

@keyframes socialPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* الجوال */
@media (max-width: 767px) {
    [href*="snapchat.com"] { right: 15px !important; width: 48px !important; height: 48px !important; }
    [href*="tiktok.com"] { right: 75px !important; width: 48px !important; height: 48px !important; }
    [href*="wa.me"] { left: 15px !important; width: 48px !important; height: 48px !important; }
    body::after { right: 40px !important; font-size: 12px !important; bottom: 15px !important; }
    [href*="wa.me"]::after { font-size: 12px !important; bottom: -30px !important; }
}