/* تنسيق كارت تفاصيل المنتج المدمج */
.pcg-main-product-card {
    background-color: #ffffff;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

/* التوافق مع الوضع الليلي (Dark Mode) */
.dark .pcg-main-product-card {
    background-color: #1f1f2c;
    border-color: #2d2d3f;
}

/* تنسيق العنوان والمفضلة */
.pcg-card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 12px;
}

@media (max-width: 991px){
    .pcg-card-title-row h1{
        line-height: 1.15 !important;
    }
}

@media (max-width: 991px){
    .pcg-card-title-row h1{
        font-size: 18px !important;
    }
}
.dark .pcg-card-title-row h1 {
    color: #ffffff;
}

/* تنسيق صف أزرار التفاعل والسعر */
.pcg-card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed #e5e7eb;
    margin-top: 15px;
    padding-top: 15px;
}
.dark .pcg-card-meta-row {
    border-top-color: #2d2d3f;
}

/* حاوية الأسعار الذكية */
.pcg-prices-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
}

/* سعر الدفع المسبق المطور */
.pcg-prepaid-price-box {
    margin-top: 0 !important;
    font-size: 13px !important;
    padding: 4px 8px !important;
    white-space: nowrap !important;
}

/* السعر الافتراضي */
.pcg-original-price-style {
    font-size: 20px !important;
    white-space: nowrap !important;
}

/* السعر الافتراضي */
.pcg-original-price-style {
    font-size: 20px;
    font-weight: 800;
    color: #050f2c;
}
.dark .pcg-original-price-style {
    color: #ffffff;
}

/* سعر الدفع المسبق المطور */
.pcg-prepaid-price-box {
    font-size: 16px !important;    /* تم تكبير الخط من 13px إلى 16px */
    color: #059669;               /* لون أخضر أغمق قليلاً ليكون أوضح في القراءة */
    font-weight: 800 !important;  /* زيادة سماكة الخط ليصبح بارزاً */
    display: flex;
    align-items: center;
    gap: 6px;                     /* زيادة بسيطة في المسافة بين الأيقونة والنص */
    padding: 4px 0;               /* إضافة مساحة بسيطة حول النص لراحة العين */
}

/* إخفاء العناصر الأصلية المشوهة لمنع التكرار */
.product-details-meta-pricing,
.product-details-meta .flex.justify-between.py-2 {
    display: none !important;
}
/* استهداف وحذف قسم السعر الأوسط المحدد فقط وتخطي كلاسات سلة المعقدة */
section.flex.py-2.sm\:pb-0.rounded-md.rounded-b-none,
section.flex.py-2[class*="sm:pb-0"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}






/* إذا كان تبويب خيارات التطوير غير نشط، أخفِ خيارات سلة فوراً */
body:not(.pcg-show-options) salla-product-options,
body:not(.pcg-show-options) .s-product-options-wrapper {
    display: none !important;
}

/* إذا كان تبويب خيارات التطوير نشط، أظهر خيارات سلة */
body.pcg-show-options salla-product-options,
body.pcg-show-options .s-product-options-wrapper {
    display: block !important;
}

/* تنسيقات شكل التبويبات لتظهر بشكل متناسق ومحاذي */
.pcg-tabs-container {
    margin-bottom: 20px;
    width: 100%;
}
.pcg-tabs-header {
    display: flex;
    border-bottom: 20px solid #f3f4f6; /* فاصل خلفي */
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 15px;
    gap: 15px;
}
.pcg-tab-btn {
    padding: 10px 15px;
    font-weight: bold;
    font-size: 14px;
    color: #6b7280;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pcg-tab-btn.active {
    color: #050f2c; /* لون متجرك الكحلي */
    border-bottom-color: #050f2c;
}
.pcg-tab-content {
    display: none;
}
.pcg-tab-content.pcg-active-content {
    display: block !important;
}
.pcg-specs-wrapper {
    line-height: 1.8;
    color: #374151;
}


/* =======================================================
   إخفاء العناوين الترويجية والفرعية لأسعار الدفع المسبق القديمة
   ======================================================= */

/* 1. إخفاء العنوان الترويجي داخل كرت المنتج */
.product-card-content-media-promotional-title,
p.product-card-content-media-promotional-title {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 2. إخفاء العنوان الفرعي داخل صفحة تفاصيل المنتج الداخلية */
.product-details-meta-subtitle,
p.product-details-meta-subtitle {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}








@media (max-width: 991px){
    custom-salla-cart-summary{
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}







/* =======================================================
   إصلاح وتنسيق جداول مواصفات القطع في صفحة المنتج للعميل
   ======================================================= */

/* 1. إظهار هيكل الجدول بالكامل ومنحه زوايا دائرية */
.product-detailed-desc table,
.product-description table,
.product-details__description table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 20px 0 !important;
    font-size: 15px !important;
    text-align: right !important;
    border: 2px solid #eef2f5 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background-color: #ffffff !important;
}

/* 2. رسم الحدود والفواصل بين الخلايا لتفصل القطع بوضوح */
.product-detailed-desc table td, 
.product-detailed-desc table th,
.product-description table td,
.product-description table th,
[class*="description"] table td {
    padding: 12px 15px !important;
    border: 1px solid #eef2f5 !important; /* فواصل رمادية خفيفة ونظيفة */
    line-height: 1.6 !important;
}

/* 3. تمييز الصف الأول (العناوين: القطعة / المواصفات) باللون الأحمر البراند */
.product-detailed-desc table tr:first-child,
.product-description table tr:first-child {
    background-color: #db1818 !important; /* اللون الأحمر */
}

.product-detailed-desc table tr:first-child td,
.product-description table tr:first-child td {
    color: #ffffff !important; /* نص أبيض للعناوين */
    font-weight: 700 !important;
}

/* 4. إعطاء العمود الأول (أسماء القطع) خلفية رمادية مميزة وخط عريض */
.product-detailed-desc table tr td:first-child,
.product-description table tr td:first-child {
    background-color: #f8fafc !important;
    font-weight: 700 !important;
    color: #111827 !important;
    width: 35% !important; /* تثبيت عرض عمود أسماء القطع */
}

/* 5. تظليل الصفوف بشكل تبادلي خفيف جداً لسهولة القراءة */
.product-detailed-desc table tr:nth-child(even),
.product-description table tr:nth-child(even) {
    background-color: #fafafa !important;
}










/* =======================================================
   تنسيق آراء العملاء (يضبط النص فقط ويحمي النجوم والأرقام)
   ======================================================= */

/* 1. قفل نص التقييم عند 3 أسطر فقط وظهور النقاط ... */
.testimonials-slider .swiper-slide p {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.6 !important;
    min-height: 72px !important; 
    max-height: 72px !important;
    margin-bottom: 10px !important;
}

/* 2. توحيد حجم النوافذ (الكروت) لتصطف بشكل متناسق */
.testimonials-slider .swiper-slide > div {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 180px !important;
    max-height: 240px !important;
    overflow: hidden !important;
}

/* 3. ضمان ظهور النجمة ورقم التقييم (5) بوضوح تام دون أي إخفاء */
.testimonials-slider .stars,
.testimonials-slider .rating,
.testimonials-slider .swiper-slide span {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-weight: bold !important;
}







/* =======================================================
   تعديل الفراغ السفلي (الطريقة الإجبارية)
   ======================================================= */

/* 1. إخفاء المحتويات */
.footer-wrapper .footer-meta, 
.footer-wrapper .s-social-list,
.footer-wrapper .s-contacts-list,
.footer-wrapper .s-menu-footer-list,
.footer-wrapper > div:last-child {
    display: none !important;
}

/* 2. إجبار الفوتر على أخذ مساحة بالـ Padding بدلاً من الـ Height */
.footer-wrapper {
    display: block !important;
    visibility: hidden !important;
    height: auto !important; /* السماح للمتصفح بتجاهل الارتفاع الثابت */
    min-height: 0 !important; /* إلغاء أي حد أدنى مفروض من سلة */
    border: none !important;
    background: transparent !important;
}









/* 1. إظهار الشريط في الكمبيوتر */
@media (min-width: 1024px) {
    .mobile-nav-bottom { display: flex !important; }
}















/* تنسيق صندوق الدفع المسبق */
.pcg-prepaid-price-box {
    display: inline-flex !important; /* تغيير من flex إلى inline-flex ليبقى في سطر واحد */
    align-items: center;
    gap: 5px;
    font-size: 13px !important;
    color: #10b981 !important;
    font-weight: 700 !important;
    margin-top: 8px !important;
    padding: 4px 8px;
    background: #f0fdf4;
    border-radius: 6px;
    
    /* الخصائص الجديدة للسطر الواحد */
    white-space: nowrap !important; /* منع النص من النزول لسطر جديد */
    width: auto !important;         /* جعل العرض يتكيف مع المحتوى فقط */
    max-width: 100% !important;     /* منع الخروج عن إطار البطاقة */
    overflow: hidden;               /* إخفاء أي زيادة غير متوقعة */
}

/* تصغير الخط قليلاً للأرقام الطويلة جداً لضمان عدم خروجها */
.pcg-prepaid-price-box span {
    font-size: 12px !important;
}












/* ضمان ظهور السعر الخاص بك بشكل مرتب في سطر واحد */
.pcg-prepaid-price-box {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    font-size: 13px !important;
    color: #10b981 !important;
    font-weight: 700 !important;
    margin-top: 8px !important;
    padding: 4px 8px;
    background: #f0fdf4;
    border-radius: 6px;
    white-space: nowrap !important;
}

/* إخفاء أي عناصر ترويجية قد تظهر لاحقاً */
.product-card-content-meta-pricing-current-discounted-meta,
.product-card-content-meta-subtitle,
.product-card-content-meta-pricing-current-discounted-percentage {
    display: none !important;
}







/* 1. تكبير السعر الأساسي وتوحيد لونه */
.product-card-content-meta-pricing-current-not-discounted,
.product-card-content-meta-pricing-current-discounted {
    color: #ef4444 !important; /* اللون الأحمر */
    font-weight: 800 !important;
    font-size: 20px !important; /* تكبير السعر الأساسي */
    display: block !important;
}

/* العنوان بحجم أكبر وبشكل احترافي */
.product-card-content-meta h4 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important; /* سطرين كحد أقصى */
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    
    /* الحجم الجديد */
    font-size: 16px !important; 
    
    /* زيادة الارتفاع ليتناسب مع الخط الجديد (18px * 1.4 * 2) */
    height: 3.8em !important; 
    
    /* مباعدة بين الأسطر لراحة العين */
    line-height: 1.4em !important;
    
    /* جعل الخط عريض جداً للوضوح */
    font-weight: 600 !important; 
    
    /* لون داكن جداً */
    color: #111827 !important;
    
    /* هامش بسيط لضمان عدم الالتصاق */
    margin-bottom: 8px !important;
}

/* 3. تثبيت ارتفاع حاوية السعر والبطاقة بالكامل */
.product-card-content-meta-pricing {
    min-height: 60px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
}

/* 4. ضمان توحيد حجم بطاقة المنتج (الارتفاع) */
.product-card-wrapper {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* 5. تنسيق الدفع المسبق */
.pcg-prepaid-price-box {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    font-size: 13px !important;
    color: #10b981 !important;
    font-weight: 700 !important;
    margin-top: 5px !important;
    padding: 3px 8px;
    background: #f0fdf4;
    border-radius: 6px;
    white-space: nowrap !important;
    width: fit-content;
}


/* العنوان ينتهي بـ ... بشكل انسيابي دون قص حاد */
.product-card-content-meta h4 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important; /* قيد الأسطر بسطرين */
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    
    /* الحجم والارتفاع لضمان اكتمال السطرين */
    font-size: 16px !important; 
    line-height: 1.5em !important; /* مسافة كافية بين الأسطر */
    height: 3em !important;      /* ارتفاع يعادل سطرين بالتمام */
    
    font-weight: 700 !important;
    color: #111827 !important;
    
    /* منع حدوث تداخل أو قص قبيح */
    text-overflow: ellipsis !important;
    white-space: normal !important;
    margin-bottom: 8px !important;
}


@media (min-width: 769px) {

  body.product-page .mobile-nav-bottom,
  body.page-product .mobile-nav-bottom,
  .product-single .mobile-nav-bottom {
      display: none !important;
  }

}





/* إخفاء الفواصل بين الأقسام تماماً */
.section-heading-divider,
.enhanced-fixed-products-heading-divider {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* إخفاء أي مساحات إضافية قد يتركها الفاصل */
section .section-heading-divider {
    display: none !important;
}




/* إظهار أسهم التنقل دائماً في جميع الشاشات */
.main-links-style-2-swiper-actions-start {
    display: flex !important; /* إجبار الحاوية على الظهور */
    visibility: visible !important;
    opacity: 1 !important;
}

/* التأكد من أن الأزرار نفسها تظهر ولا تختفي */
.prev-nav-button, 
.next-nav-button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important; /* التأكد من أنها قابلة للضغط */
}

/* إزالة أي إخفاء افتراضي قد يكون وضعه القالب للشاشات الكبيرة */
@media (min-width: 1024px) {
    .main-links-style-2-swiper-actions-start {
        display: flex !important;
    }
}






















@media (min-width: 992px){

  .container:has(#default-styled-tab){
    position: relative;
  }

  .container:has(#default-styled-tab) .mb-6{
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
  }

  #default-styled-tab{
    margin: 0 !important;
  }

  .enhanced-products-slider-swiper-actions-center{
    position: absolute !important;
    top: 20px !important;
    left: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
  }

  .enhanced-products-slider-swiper-actions-center-pagination{
    display: none !important;
  }

  .enhanced-products-slider-swiper-actions-center-prev,
  .enhanced-products-slider-swiper-actions-center-next{
    width: 42px !important;
    height: 42px !important;
    border-radius: 14px !important;
    background: #111 !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}
















@media (max-width: 991px){

  body.product-page .mobile-nav-bottom,
  body.page-product .mobile-nav-bottom,
  .product-single .mobile-nav-bottom{
      display: none !important;
  }

}
@media (max-width: 991px){

  .sticky-product-bar{
      position: fixed !important;
      bottom: 0 !important;
      left: 0 !important;
      right: 0 !important;
      width: 100vw !important;
      max-width: 100vw !important;
      margin: 0 !important;
      transform: none !important;
      z-index: 9999 !important;
      background: #fff !important;
      padding: 8px 10px !important;
      box-shadow: 0 -4px 15px rgba(0,0,0,.08) !important;
      border-radius: 0 !important;
  }

}






/* ========================== */
/* PCG - أسهم السلايدر للجوال */
/* فوق التبويبات */
/* ========================== */

@media (max-width: 991px){

  .container:has(#default-styled-tab){
    position: relative;
  }

  .enhanced-products-slider-swiper-actions-center{
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;

    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    z-index: 10;
  }

  .enhanced-products-slider-swiper-actions-center-pagination{
    display: none !important;
  }

  .enhanced-products-slider-swiper-actions-center-prev,
  .enhanced-products-slider-swiper-actions-center-next{
    width: 30px !important;
    height: 30px !important;
    border-radius: 10px !important;
    background: #111 !important;
    color: #fff !important;

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

  .enhanced-products-slider-swiper-actions-center svg{
    width: 16px !important;
    height: 16px !important;
  }
}

/* ========================== */
/* نهاية التعديل */
/* ========================== */






























/* التبويبات للكمبيوتر: واسعة قدر الإمكان */
@media (min-width: 992px){
  #default-styled-tab{
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
    width: 100% !important;
  }

  #default-styled-tab li,
  #default-styled-tab button{
    width: 100% !important;
  }

  #default-styled-tab button{
    padding: 15px 22px !important;
    border-radius: 16px !important;
    text-align: center !important;
    white-space: nowrap !important;
  }
}

/* الجوال: ضيقة وتتحرك يمين ويسار إذا خرجت */
@media (max-width: 991px){
  #default-styled-tab{
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 8px !important;
    padding-bottom: 6px !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  #default-styled-tab li{
    flex: 0 0 auto !important;
  }

  #default-styled-tab button{
    min-width: max-content !important;
    padding: 9px 13px !important;
    border-radius: 13px !important;
    white-space: nowrap !important;
    scroll-snap-align: start;
  }

  #default-styled-tab::-webkit-scrollbar{
    display: none;
  }
}

#default-styled-tab button[aria-selected="true"]{
    font-weight: 800 !important;
    border-bottom-width: 3px !important;
}

#default-styled-tab button{
    transition: .2s ease;
}




.mb-6{
    margin-bottom: 6px !important;
}

.enhanced-products-slider{
    padding-top: 8px !important;
}









/* ========================== */
/* PCG - تقليل المسافات بين الأقسام */
/* بدون التأثير على الفوتر */
/* ========================== */

section{
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

/* جميع الحاويات ماعدا حاويات الفوتر */
body .container:not(.footer-wrapper .container){
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* إعادة مسافات الفوتر الطبيعية */
.footer-wrapper,
.footer-wrapper .container,
footer .container{
    padding-top: revert !important;
    padding-bottom: revert !important;
}








/* إخفاء قسم التعليقات الأصلي كاملاً */
#comments{
    display:none !important;
}




/* إخفاء مسار التنقل بالكامل */
salla-breadcrumb{
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* إزالة أي حاوية أو مساحة خاصة به */
.product-breadcrumb,
.breadcrumb,
.s-breadcrumb-wrapper{
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}





/* مساحة إضافية أسفل المتجر لإظهار التقييمات بالكامل */
@media (max-width: 991px){
    body{
        padding-bottom: 70px !important;
    }
}
/* مساحة أسفل المتجر للكمبيوتر فقط */
@media (min-width: 992px){
    body{
        padding-bottom: 70px !important;
    }
}