/* ═══════════════════════════════════════════════════════
   🛒 CUSTOM CSS - Salla Store Theme
   ═══════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────
   1. زر "اشترِ الآن" في كروت المنتجات
   ─────────────────────────────────────────────────────── */
.product-card__enhanced-mini-cart button.s-button-element {
  background: #0a1a35;
  color: #fff;
  border: none;
  border-radius: 0;
  font-weight: 500;
  overflow: hidden;
  position: relative;
  transition: background 0.45s ease,
              transform 0.25s ease,
              box-shadow 0.35s ease;
}

/* لمعة شيمر */
.product-card__enhanced-mini-cart button.s-button-element::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,0.25) 50%,
    transparent 100%
  );
  transform: skewX(-25deg);
  transition: 0.6s;
}

/* هوفر — جرادينت Navy → Gold */
.product-card__enhanced-mini-cart button.s-button-element:hover {
  background: linear-gradient(135deg, #0a1a35 0%, #1c2f55 30%, #d4af37 100%);
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.25);
}

/* حركة لمعة الشيمر */
.product-card__enhanced-mini-cart button.s-button-element:hover::before {
  left: 130%;
}

/* ───────────────────────────────────────────────────────
   2. خلفية محتوى كروت المنتجات المقترحة
   ─────────────────────────────────────────────────────── */
.alfinder-product-card-content {
  background-color: #E9E9E9 !important;
}

/* إخفاء عنصر Portal */
.styles__containerPortal--c9f84 {
  display: none !important;
}

/* ───────────────────────────────────────────────────────
   3. إخفاء عنوان H1 في صفحة المحتوى الثابت (ثيم Celia)
   ─────────────────────────────────────────────────────── */
.page.single .content.content--single-page > h1.font-bold.text-2xl.mb-6 {
  display: none !important;
}

/* ───────────────────────────────────────────────────────
   4. Full-bleed + إخفاء H1 للصفحات الأربع المحددة
   ─────────────────────────────────────────────────────── */

/* منع سكرول أفقي */
html, body {
  overflow-x: hidden;
}

/* إخفاء H1 */
body.fullframe-page-1845996425 .content.content--single-page > h1.font-bold.text-2xl.mb-6,
body.fullframe-page-362968704  .content.content--single-page > h1.font-bold.text-2xl.mb-6,
body.fullframe-page-1081465301 .content.content--single-page > h1.font-bold.text-2xl.mb-6,
body.fullframe-page-871582778  .content.content--single-page > h1.font-bold.text-2xl.mb-6 {
  display: none !important;
}

/* تمديد منطقة المحتوى فل-فريم */
body.fullframe-page-1845996425 .content.content--single-page .content-entry,
body.fullframe-page-362968704  .content.content--single-page .content-entry,
body.fullframe-page-1081465301 .content.content--single-page .content-entry,
body.fullframe-page-871582778  .content.content--single-page .content-entry {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* الصور فل-فريم */
body.fullframe-page-1845996425 .content.content--single-page .content-entry img,
body.fullframe-page-362968704  .content.content--single-page .content-entry img,
body.fullframe-page-1081465301 .content.content--single-page .content-entry img,
body.fullframe-page-871582778  .content.content--single-page .content-entry img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* قص التجاوز الأفقي */
body.fullframe-page-1845996425 > header,
body.fullframe-page-1845996425 > footer,
body.fullframe-page-1845996425 > main,
body.fullframe-page-362968704  > header,
body.fullframe-page-362968704  > footer,
body.fullframe-page-362968704  > main,
body.fullframe-page-1081465301 > header,
body.fullframe-page-1081465301 > footer,
body.fullframe-page-1081465301 > main,
body.fullframe-page-871582778  > header,
body.fullframe-page-871582778  > footer,
body.fullframe-page-871582778  > main {
  overflow-x: hidden;
}

/* ───────────────────────────────────────────────────────
   5. تأثير نبضة عيد الأم (Navy Pulse)
   ─────────────────────────────────────────────────────── */
p.product-card__subtitle.mothers-day-pulse {
  font-weight: 700 !important;
  color: #1e3a8a !important;
  -webkit-text-fill-color: #1e3a8a !important;
  animation: navy-pulse 2.5s ease-in-out infinite;
}

@keyframes navy-pulse {
  0%   { opacity: 1; filter: brightness(1) drop-shadow(0 0 0px #1e3a8a); }
  50%  { opacity: 0.75; filter: brightness(1.4) drop-shadow(0 0 8px #1e3a8a); }
  100% { opacity: 1; filter: brightness(1) drop-shadow(0 0 0px #1e3a8a); }
}

/* ───────────────────────────────────────────────────────
   6. تعديل حجم الصور في السلايدر
   ─────────────────────────────────────────────────────── */
.advanced-slider__image {
  object-fit: contain !important;
  object-position: center !important;
  width: 100% !important;
  height: 100% !important;
}

/* ───────────────────────────────────────────────────────
   7. إخفاء ودجات Tamara
   ─────────────────────────────────────────────────────── */
.tamara-product-widget,
.styles__containerPortal--c9f84 {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* ───────────────────────────────────────────────────────
   8. مميزات المنتج (Product Features)
   ─────────────────────────────────────────────────────── */
#my-product-features {
  margin: 20px 0 !important;
  direction: rtl !important;
}

/* ───────────────────────────────────────────────────────
   9. بوكس التقسيط (EMI Box) - النسخة النهائية المدمجة
   ─────────────────────────────────────────────────────── */
.cjs-emi-box {
  position: relative;
  overflow: hidden;
  background: #E9E9E9 !important;
  border: 2px solid #111c3d !important;
  border-radius: 14px !important;
  padding: 18px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 10px !important;
  box-sizing: border-box !important;
}

/* تأثير اللمعة */
.cjs-emi-box::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.4) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: skewX(-20deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0%   { left: -75%; }
  100% { left: 125%; }
}

/* نصوص التقسيط */
.cjs-emi-text {
  width: 100% !important;
  text-align: center !important;
}

.cjs-emi-title {
  display: none !important;
}

.cjs-emi-desc {
  font-size: 13px !important;
  line-height: 1.8 !important;
  color: #111111 !important;
  font-weight: 700 !important;
  text-align: center !important;
  margin: 0 !important;
}

/* اللوجوهات */
.cjs-emi-logos {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  width: 100% !important;
}

.cjs-emi-logo {
  height: 24px !important;
  width: auto !important;
  object-fit: contain !important;
  display: block !important;
}

.cjs-emi-logo-tabby {
  height: 20px !important;
}

.cjs-emi-logo-tamara {
  height: 16px !important;
}

.cjs-emi-separator {
  font-size: 12px !important;
  color: #8A8A8A !important;
  line-height: 1 !important;
}

/* ───────────────────────────────────────────────────────
   10. تاج العروض (Promotion Badge)
   ─────────────────────────────────────────────────────── */
.product-card,
.product-item,
.s-product-card {
  position: relative !important;
  overflow: hidden;
}

.product-card__promotion {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  left: auto !important;
  width: fit-content !important;
  max-width: max-content;
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 10;
}

/* ───────────────────────────────────────────────────────
   11. تحسينات الأداء (Performance)
   ─────────────────────────────────────────────────────── */
.salla-header,
.salla-navbar {
  will-change: transform;
  contain: layout style;
}

/* تقليل إعادة الرسم */
* {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeSpeed;
}

/* إخفاء الصور حتى تكتمل */
img:not([src]),
img[src=""] {
  visibility: hidden;
}

/* منع layout shift */
img {
  height: auto;
}
.fixed-banner--1 {
    margin-top: 10px !important;
    padding-top: 0 !important;
}
.advanced-slider--1 {
    margin-top: 15px !important;
}
/* ===========================================
   قسم المربعات (square-links) — ضبط كامل
   =========================================== */

.s-block--square-links {
  /* متغيّر واحد يتحكم بكل الفراغات: فوق، تحت، والجوانب، والمسافة بين المربعات */
  --sq-space: 12px;

  margin-top: 0 !important;
  margin-bottom: 0 !important;

  padding-top: var(--sq-space) !important;
  padding-bottom: var(--sq-space) !important;
}

/* المسافة بين المربعات (الشرائط البنفسجية) */
.s-block--square-links .square-links__grid {
  gap: var(--sq-space) !important;              /* أفقي وعمودي بنفس القيمة */
  padding-inline: var(--sq-space) !important;   /* الجوانب — نفس القيمة عشان يتناسق */
}

/* الفراغ مع الأقسام المجاورة */
.s-block:has(+ .s-block--square-links) {
  margin-bottom: 8px !important;
}

.s-block--square-links + .s-block {
  margin-top: 8px !important;
}
/* ===========================================
   البانر الثابت رقم 3 (ساعات كارديال)
   — تقليل الفراغ العلوي ليطابق السفلي
   =========================================== */

.fixed-banner--3 {
  margin-top: 8px !important;      /* الفراغ فوق */
  margin-bottom: 8px !important;   /* الفراغ تحت — نفس القيمة */
}

/* الفراغ البرتقالي قد يكون جاي من القسم اللي فوقه (بانر FOR MEN)
   وليس من هذا القسم. هذا السطر يمسكه ويقلّله */
.s-block:has(+ .fixed-banner--3) {
  margin-bottom: 0 !important;
}

/* ═══════════════════════════════════════
   دمج قسم SQ-LINKS مع البانر اللي فوقه
   ملاحظة: يجب أن يبقى في نهاية الملف
   ═══════════════════════════════════════ */

/* الكلاسان ملتصقان بدون مسافة = العنصر يحمل الاثنين معًا،
   وهذا يجعل القاعدة أقوى من القاعدة العامة أعلاه */
.s-block--square-links.SQ-LINKS {
  margin-top: -100px !important;   /* السحب لأعلى فوق البانر */
  padding-top: 0 !important;       /* نلغي الـ 12px من متغير --sq-space */
  position: relative;              /* شرط لعمل z-index */
  z-index: 5;                      /* يضمن ظهور الصور فوق البانر */
}

/* نلغي المسافة السفلية من البانر الملاصق لقسمنا فقط */
.s-block:has(+ .SQ-LINKS) {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* الحاويات الداخلية لها حشو منفصل */
.SQ-LINKS > div,
.SQ-LINKS .container {
  padding-top: 0 !important;
}

/* الجوال: الركوب الكبير يخفي البانر على الشاشات الضيقة */
@media (max-width: 768px) {
  .s-block--square-links.SQ-LINKS {
    margin-top: -40px !important;
  }
}
/* Brand squares on the brands page */
a.brand-item,
a.brand-item:hover {
  background-color: #E9E9E9 !important;
}
/* صورة العلامة التجارية في صفحة البراند */
main .container > header > img.shrink-0 {
  padding: 0 !important;          /* نشيل المسافة الداخلية (p-4) اللي كانت مصغّرة الصورة */
  object-fit: cover !important;   /* الصورة تملأ المربع بالكامل بدل ما تتصغّر جواه */
  width: 10rem !important;        /* العرض (160px). غيّره لو عايز المربع أكبر */
  height: 6rem !important;        /* الارتفاع (96px) */
}
/* لوجو البراند في صفحة المنتج (فوق اسم المنتج) */
/* الحاوية الخارجية: كانت w-12 يعني 48px ثابتة */
.product-single__brand-row .product-brand {
  width: auto !important;
  height: auto !important;
}
/* اللينك اللي شايل الصورة: هنا بنحدد الحجم الجديد */
.product-single__brand-row .brand-logo {
  display: block !important;
  width: 120px !important;   /* غيّر الرقم ده لتكبير/تصغير اللوجو */
  height: auto !important;
}
/* الصورة نفسها تملأ اللينك بالكامل */
.product-single__brand-row .brand-logo img {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
}

/* ===== سكشن عداد العروض: في الموبايل بس (الديسكتوب يفضل بالتصميم الأصلي) ===== */
@media (max-width: 767px) {
  /* 1) تقليل المسافة فوق وتحت عشان السكشن يبقى نحيف */
  .s-block--offer-countdown .offer-countdown-container {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
  /* 2) العنوان فوق والعداد تحته وكله في المنتصف */
  .s-block--offer-countdown .offer-countdown-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  /* 3) تصغير خط العنوان */
  .s-block--offer-countdown .offer-countdown-title {
    font-size: 15px !important;
    line-height: 1.4 !important;
    margin: 0 !important;
  }
  /* 4) العداد ياخد على قد محتواه */
  .s-block--offer-countdown .offer-countdown-timer,
  .s-block--offer-countdown salla-count-down,
  .s-block--offer-countdown .s-count-down-list {
    width: auto !important;
    margin: 0 !important;
  }
  .s-block--offer-countdown .s-count-down-list {
    display: flex !important;
    gap: 4px !important;
  }
  /* 5) مربعات العداد صغيرة والرقم جنب الكلمة */
  .s-block--offer-countdown .s-count-down-item {
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 3px 8px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    gap: 3px !important;
  }
  .s-block--offer-countdown .s-count-down-item-value {
    font-size: 14px !important;
    line-height: 1.2 !important;
  }
  .s-block--offer-countdown .s-count-down-item-label {
    font-size: 11px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }
}

/* ═══════════════════════════════════════
   البانر المزدوج (للرجال / للنساء)
   — راكب على البنر اللي قبله + مسافة أكبر تحته
   ملاحظة: استخدمنا اسم القسم بدل الرقم (--1)
   لأن الرقم يتغير لما نرتب الأقسام
   ═══════════════════════════════════════ */
.s-block--double-banner {
  margin-top: -100px !important;   /* سالب = يطلع لفوق ويركب على البنر اللي قبله */
  margin-bottom: 40px !important;  /* مسافة أكبر بينه وبين البنر الكبير اللي تحته */
  position: relative;              /* شرط لعمل z-index */
  z-index: 5;                      /* يخلي البنر يظهر فوق البنر اللي قبله مش تحته */
}

/* الجوال: نقلل الركوب عشان ما يغطيش البنر اللي فوق كله */
@media (max-width: 768px) {
  .s-block--double-banner {
    margin-top: -40px !important;
    margin-bottom: 24px !important;
  }
}

/* ═══════════════════════════════════════
   مربعات الأسعار (99 / 199 / 299)
   — سطر واحد دايمًا على الجوال والتابلت
   ═══════════════════════════════════════ */
.s-block--square-links.merge-with-top-component .square-links__grid,
.square-links-3 .square-links__grid {
  grid-template-columns: none !important;  /* نلغي توزيع الثيم اللي بيكسر لسطرين */
  grid-auto-flow: column !important;       /* كل عنصر جديد يروح عمود جنب اللي قبله */
  grid-auto-columns: 1fr !important;       /* كل الأعمدة بنفس العرض */
}

@media (max-width: 1024px) {
  .s-block--square-links.merge-with-top-component .square-links__grid,
  .square-links-3 .square-links__grid {
    gap: 8px !important;                   /* مسافة أصغر بين المربعات عشان يكفّوا */
    padding-inline: 8px !important;
  }
}
/* سلايد عرض الألماس */
.special-slider__content:has(a.special-products-slider__button[href$="/c2038558527"]) {
  --diamond-content-top: 20%; /* الديسكتوب */
  justify-content: flex-start;
  padding-block: var(--diamond-content-top) 0;
  gap: 16px;
}

.special-slider__content:has(a.special-products-slider__button[href$="/c2038558527"]) > * {
  margin-block: 0;
}

@media (max-width: 767px) {
  .special-slider__content:has(a.special-products-slider__button[href$="/c2038558527"]) {
    --diamond-content-top: clamp(56px, 18vw, 100px); /* الجوال */
    gap: 12px;
  }
}