/* ============================================
   Promising Idea — Final Clean CSS
   نسخة محسّنة بدون مشاكل أزرار أو سلة
   ============================================ */

/* --- الخطوط --- */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;700&family=Rajdhani:wght@600&display=swap');

/* --- متغيرات الهوية --- */
:root {
    --navBgColor: #3D5A73;
    --navBgDark: #2C4359;
    --navFontColor: #ffffff;
    --btnHoverColor: #2C4359;
    --voidBg: #141414;
    --goldStar: #E8A020;
}

/* --- الخط العام --- */
body, p, span, a, li, td, button, input {
    font-family: 'IBM Plex Sans Arabic', sans-serif !important;
}

/* ============================================
   الهيدر
   ============================================ */
#mainnav .inner {
    background: var(--navBgColor);
    color: var(--navFontColor);
}

/* ============================================
   الأزرار الأساسية (بدون تخريب)
   ============================================ */
.s-button-element,
.btn-add-to-cart,
.btn-primary,
.salla-button--primary {
    background-color: var(--navBgColor) !important;
    color: #fff !important;
    border-radius: 8px !important;
}

.s-button-element:hover,
.btn-primary:hover {
    background-color: var(--btnHoverColor) !important;
}

/* ============================================
   إصلاح زر إضافة للسلة (المشكلة الأساسية)
   ============================================ */
.product-form .s-button-element,
.product-form button[type="submit"],
.sticky-product-bar .s-button-element,
.s-product-sticky .s-button-element {

    background: #3D5A73 !important;
    color: #ffffff !important;
    background-image: none !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 700 !important;

    min-height: 48px !important;
}

/* تأكيد ظهور النص داخل الزر */
.product-form button span,
.sticky-product-bar button span {
    display: inline !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ============================================
   إصلاح أيقونة الحذف في السلة
   ============================================ */
.s-cart-item-remove,
.s-cart-item-remove button,
.cart-item-remove,
button[aria-label="Remove"],
button[aria-label="حذف"] {

    display: inline-flex !important;
    opacity: 1 !important;
    visibility: visible !important;

    background: transparent !important;
    background-image: none !important;

    color: #ff4d4f !important;
}

/* تأكيد ظهور الأيقونة */
.s-cart-item-remove svg,
.cart-item-remove svg {
    display: inline-block !important;
    fill: #ff4d4f !important;
    stroke: #ff4d4f !important;
}

/* ============================================
   كروت المنتجات
   ============================================ */
.s-product-card-entry {
    border: 2px solid var(--navBgColor);
    border-radius: 10px !important;
    transition: 0.2s;
}

.s-product-card-entry:hover {
    transform: translateY(-3px);
}

/* ============================================
   النجوم
   ============================================ */
.stars,
.rating,
svg[class*="star"] {
    color: var(--goldStar) !important;
    fill: var(--goldStar) !important;
}

/* ============================================
   الفوتر + اللوقو
   ============================================ */
.store-footer__inner {
    background-color: var(--voidBg) !important;
    color: #ccc;
}

/* لوقو الفوتر */
.store-footer__inner::before {
    content: "";
    background-image: url("PUT-YOUR-LOGO-LINK-HERE");
    background-size: contain;
    background-repeat: no-repeat;

    position: absolute;
    top: 20px;
    left: calc(100% - 110px);

    width: 100px;
    height: 100px;
}

/* موبايل */
@media (max-width: 768px) {
    .store-footer__inner::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ============================================
   صفحة التحميل
   ============================================ */
.loader,
.loading,
.preloader {
    background: linear-gradient(135deg, #3D5A73, #2C4359) !important;
}

.loader::before {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader::after {
    content: "PROMISING IDEA";
    color: #fff;
    margin-top: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}/* شريط علوي متحرك */
header::before {
  content: "🚚 توصيل سريع لجميع مناطق المملكة     |     🎧 دعم فني     |     🔒 منتجات مضمونة     |     ⚡ حلول تقنية تسهّل حياتك";
  display: block;
  width: 100%;
  background: #2C4359;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 0;
  white-space: nowrap;
  overflow: hidden;
  animation: piTopBarMove 18s linear infinite;
}

@keyframes piTopBarMove {
  0% {
    text-indent: 100%;
  }
  100% {
    text-indent: -100%;
  }
}/* 1) ترجيع حركة شعار الهيدر */
#mainnav .navbar-brand,
.navbar-brand {
  animation: piLogoFloat 3.5s ease-in-out infinite !important;
  transform-origin: center !important;
}

#mainnav .navbar-brand img,
.navbar-brand img {
  max-height: 52px !important;
  width: auto !important;
  object-fit: contain !important;
}

@keyframes piLogoFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.03); }
}

/* إخفاء المربع الرمادي والشعار المكرر */
.s-product-card-image [class*="badge"],
.s-product-card-image [class*="label"],
.s-product-card-image [class*="promotion"],
.s-product-card-image [class*="ribbon"] {
    display: none !important;
}

/* إضافة شعار واحد فقط بدل المربع */
.s-product-card-image {
    position: relative !important;
}

.s-product-card-image::after {
    content: "";
    position: absolute;
    top: 12px;
    left: 12px;
    width: 52px;
    height: 52px;
    background-image: url("");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 20;
    pointer-events: none;
}/* تنظيف كل الشعارات/المربعات داخل صورة المنتج */
.s-product-card-image::before,
.s-product-card-image [class*="badge"],
.s-product-card-image [class*="label"],
.s-product-card-image [class*="promotion"],
.s-product-card-image [class*="ribbon"],
.s-product-card-image .badge,
.s-product-card-image .label {
    display: none !important;
    content: none !important;
    background: none !important;
    background-image: none !important;
}

/* منع أي شعار سابق */
.s-product-card-image::after {
    content: "" !important;
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    width: 50px !important;
    height: 50px !important;
    background-image: url("https://cdn.salla.sa/QdxNex/products/bVAIB7n14TgXSiR9vAzgriJm9Q2xW6GMW6HJt1aT.png") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    z-index: 50 !important;
    pointer-events: none !important;
}

/* تأكيد مكان الصورة */
.s-product-card-image {
    position: relative !important;
    overflow: hidden !important;
}