/* ===================================================================
   FULL MERGED CSS — ULTIMATE FINAL (Salla-friendly)
   ضعه بعد جميع ملفات الثيم ليأخذ الأولوية
   =================================================================== */

/* 0) خلفية عامة */
html, body{ background:#ffffff !important; color:#111827 !important; }
:where(.site, .page, .main, .container, .content, .app, .wrapper){ background: transparent !important; }

/* ---------------- Vars ---------------- */
:root{
  /* بطاقات المنتجات */
  --pc-bg:#F8FAFC; --pc-border:#EEF2F7; --pc-radius:14px;
  --pc-shadow:0 6px 18px rgba(15,23,42,.06);
  --pc-shadow-lg:0 10px 24px rgba(15,23,42,.12);
  --pc-accent:#0ea5e9; --pc-accent2:#6366f1; --pc-accent-fg:#fff;
  --pc-title:1rem; --pc-title-lh:1.55; --pc-img-pad:8px;

  /* أقسام السلايدر */
  --cat-size:132px; --cat-radius:20px; --cat-title:16px;
  --cat-gap:12px; --cat-gap-desktop:24px;
  --cat-bg:#fff; --cat-outline:1px solid #e5e7eb; --cat-shadow:0 2px 8px rgba(0,0,0,.08);
}

/* =============================================================
   1) توحيد بطاقات المنتجات (تغطية موسّعة) — الحاوية
   ============================================================= */
:where(
  /* سلة */
  .s-product-card-entry, .s-products-slider-card, .s-product-card-vertical,
  .s-product-card-content, .s-product-card-fit-height,

  /* تغطية عامة */
  .product-card, .product-item, .product_tile, .product-tile, .card--product, .card-product,
  .prod-card, .item-product, .product, li.product, .grid__item.product, [data-product], [data-product-id]
){
  background: var(--pc-bg) !important;
  border: 1px solid var(--pc-border) !important;
  border-radius: var(--pc-radius) !important;
  box-shadow: var(--pc-shadow) !important;
  overflow: hidden !important;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
:where(
  .s-product-card-entry, .s-products-slider-card, .s-product-card-vertical,
  .product-card, .product-item, .product_tile, .product-tile, .card--product, .card-product,
  .prod-card, .item-product, .product
):hover{
  transform: translateY(-4px);
  box-shadow: var(--pc-shadow-lg) !important;
  border-color: color-mix(in oklab, var(--pc-accent) 36%, #fff) !important;
}

/* داخل سلايدرات سلة/سويبر (من الكلاسات التي زوّدتني بها) */
:where(.s-products-slider-wrapper,.s-slider-wrapper,.s-slider-container,.s-slider-swiper-wrapper,
       .s-products-slider-slider,.swiper-wrapper) :where(.swiper-slide){
  /* لا نغيّر المقاسات هنا لتجنّب تعارض، التوحيد على البطاقة نفسها */
}

/* =============================================================
   2) صورة المنتج — مربع contain + sheen لطيف
   ============================================================= */
:where(.s-product-card-image,.s-product-card-image-contain,
       .product-card__image,.product-image,.card__media,.media,.image,figure){
  position:relative !important;
  aspect-ratio:1 / 1 !important;
  background:#fff !important;
  padding: var(--pc-img-pad) !important;
  border-radius: calc(var(--pc-radius) - 2px) !important;
  border:0 !important; overflow:hidden !important;
}
:where(.s-product-card-image img,.s-product-card-image-contain img,
       .product-card__image img,.product-image img,.card__media img,
       .media img,.image img,figure > img,picture > img){
  width:100% !important; height:100% !important;
  object-fit:contain !important; object-position:center !important;
  max-width:100% !important; max-height:100% !important; transform:none !important;
}
/* sheen */
:where(.s-product-card-image,.s-product-card-image-contain,
       .product-card__image,.product-image,.card__media,.media,.image,figure)::before{
  content:""; position:absolute; inset:0;
  background:linear-gradient(120deg,transparent 0%,rgba(255,255,255,.55) 45%,transparent 60%);
  transform:translateX(-120%) skewX(-18deg);
  transition:transform .7s cubic-bezier(.2,.6,.2,1);
}
:where(.s-product-card-entry,.s-products-slider-card,.s-product-card-vertical,
       .product-card,.product-item,.card--product,.card-product,.prod-card,.item-product,.product):hover
  :where(.s-product-card-image,.s-product-card-image-contain,
         .product-card__image,.product-image,.card__media,.media,.image,figure)::before{
  transform:translateX(120%) skewX(-18deg);
}

/* =============================================================
   3) محتوى البطاقة + العنوان
   ============================================================= */
:where(.s-product-card-content-main,.product-card__content,.card__content){ padding:10px 12px 0 !important; }
:where(.s-product-card-content-footer,.product-card__footer,.card__footer){ padding:0 12px 12px !important; }

:where(.s-product-card-content-title,.s-product-card .title,.s-product-card h3,
       .product-card__title,.card__heading,.product-title,.product__title,h3.card__title,h3.product-title){
  margin:8px 0 2px !important;
  font-size:var(--pc-title) !important;
  line-height:var(--pc-title-lh) !important;
  color:#111827 !important;
  display:-webkit-box !important; -webkit-box-orient:vertical !important;
  -webkit-line-clamp:2 !important; overflow:hidden !important; text-overflow:ellipsis !important;
  transition:color .2s ease;
}
:where(.s-product-card-entry,.s-products-slider-card,.s-product-card-vertical,
       .product-card,.product-item,.card--product,.card-product,.prod-card,.item-product):hover
  :where(.s-product-card-content-title,.s-product-card .title,.product-card__title,.card__heading){
  color:#0f172a !important;
}

/* =============================================================
   4) السعر — في المنتصف دائمًا + العملة بالأحمر + منع التكرار
   ============================================================= */
:where(.s-product-card-price,.product-card__price,.price,.product-price,.card__price,.pricing){
  display:flex !important;
  justify-content:center !important; align-items:baseline !important; text-align:center !important;
  width:100% !important;
  gap:.35rem !important; white-space:nowrap !important;
  margin:6px 0 12px !important;
  font-weight:800 !important; font-size:1.05rem !important; color:#111827 !important; position:relative;
}

/* أخفي نصوص العملة الرمادية لمنع الازدواج */
:where(.s-product-card-price,.product-card__price,.price,.product-price,.card__price)
  :is(.text-gray-400,.text-gray-500){ display:none !important; }

/* أعد إظهار عناصر العملة واصبغها بالأحمر */
:where(.s-product-card-price,.product-card__price,.price,.product-price,.card__price)
  :is(.currency,[class*="curr"],[data-currency],.s-currency,[class*="unit"],[class*="sar"],[aria-label*="sar"],[aria-label*="currency"],.money,.amount,.price__regular,.price-item,.text-primary){
  display:inline !important; color:#dc2626 !important; font-weight:800 !important;
}
:where(.s-product-card-price,.product-card__price,.price,.product-price,.card__price) .sicon-sar{
  color:#dc2626 !important;
}
:where(.s-product-card-price,.product-card__price,.price,.product-price,.card__price) svg,
:where(.s-product-card-price,.product-card__price,.price,.product-price,.card__price) svg *{
  fill:#dc2626 !important; stroke:#dc2626 !important; color:#dc2626 !important;
}

/* لو ما فيه عنصر عملة ظاهر — أضف "ريال" */
:where(.s-product-card-price,.product-card__price,.price,.product-price,.card__price):not(:has(
  .currency,[class*="curr"],[data-currency],.s-currency,[class*="unit"],[class*="sar"],.money,.amount,.sicon-sar
))::after{
  content:" ريال"; color:#dc2626 !important; font-weight:800 !important; margin-inline-start:.15rem;
}

/* حماية لون الرمز لو جاء عبر ::before/::after من الثيم */
:where(.s-product-card-price,.product-card__price,.price,.product-price,.card__price)::before,
:where(.s-product-card-price,.product-card__price,.price,.product-price,.card__price)::after{
  color:#dc2626 !important;
}

/* =============================================================
   5) زر الإضافة للسلة — توحيد
   ============================================================= */
:where(
  .s-product-card-content-footer .s-button-btn,
  .s-product-card-content-footer .s-button-element,
  .product-card__button,.product-form__submit,.add-to-cart,[data-action*="cart"],
  button[name="add"],button.add-to-cart,.btn--add-to-cart
){
  width:100% !important; min-height:48px !important;
  display:flex !important; align-items:center !important; justify-content:center !important; gap:.5rem !important;
  border:0 !important; border-radius:10px !important;
  background:linear-gradient(135deg,var(--pc-accent),var(--pc-accent2)) !important;
  color:var(--pc-accent-fg) !important; font-weight:800 !important; font-size:1rem !important;
  box-shadow:0 6px 18px rgba(14,165,233,.22) !important;
  transition:transform .12s ease, filter .12s ease, box-shadow .2s ease !important;
}
:where(
  .s-product-card-content-footer .s-button-btn,
  .s-product-card-content-footer .s-button-element,
  .product-card__button,.product-form__submit,.add-to-cart,[data-action*="cart"],
  button[name="add"],button.add-to-cart,.btn--add-to-cart
)::before{
  content:"+"; font-size:1.25rem; font-weight:700; line-height:1; transform:translateY(-1px);
}
:where(
  .s-product-card-content-footer .s-button-btn,
  .s-product-card-content-footer .s-button-element,
  .product-card__button,.product-form__submit,.add-to-cart,[data-action*="cart"],
  button[name="add"],button.add-to-cart,.btn--add-to-cart
):hover{
  filter:brightness(.98); transform:translateY(-2px);
  box-shadow:0 10px 28px rgba(14,165,233,.28) !important;
}
:where(
  .s-product-card-content-footer .s-button-btn,
  .s-product-card-content-footer .s-button-element,
  .product-card__button,.product-form__submit,.add-to-cart,[data-action*="cart"],
  button[name="add"],button.add-to-cart,.btn--add-to-cart
):active{ transform:translateY(0); filter:brightness(.96); }
:where(
  .s-product-card-content-footer .s-button-btn,
  .s-product-card-content-footer .s-button-element,
  .product-card__button,.product-form__submit,.add-to-cart,[data-action*="cart"],
  button[name="add"],button.add-to-cart,.btn--add-to-cart
) :is([class*="lock"],[data-icon="lock"]){ display:none !important; }

/* تقليل الحركة */
@media (prefers-reduced-motion: reduce){
  :where(.s-product-card-entry,.s-products-slider-card,.s-product-card-vertical,
         .s-product-card-image,.s-product-card-image-contain){ transition:none !important; }
}

/* =============================================================
   6) سلايدر الأقسام — صور أكبر + عناوين كاملة + 2.5 بطاقة بالجوال
   (تم تعديل الحواف الخارجية والإبعاد بين الصورة والعنوان)
   ============================================================= */
.s-block.s-block--categories .swiper-slide{
  margin-inline:calc(var(--cat-gap)/2) !important;
  height:auto !important; overflow:visible !important; background:transparent !important; box-shadow:none !important;
  padding:12px !important; /* تم تكبير الحافة الداخلية */
  display:flex !important; flex-direction:column; align-items:center; text-align:center;
  border:3px solid #d1d5db !important; /* إطار خارجي سميك وواضح */
  border-radius:22px !important;       /* تكبير الحواف قليلاً لتناسق الشكل */
  transition:all .25s ease;
}
.s-block.s-block--categories .swiper-wrapper{ margin-inline:calc(var(--cat-gap)*-0.5) !important; }

.s-block.s-block--categories .swiper-slide :is(figure,.slide__image,.image,.media){
  overflow:visible !important; background:transparent !important; border:0 !important;
  margin:0 auto !important; display:block !important;
}
.s-block.s-block--categories .swiper-slide img{
  display:block !important;
  width:min(var(--cat-size),32vw) !important; height:min(var(--cat-size),32vw) !important;
  aspect-ratio:1/1 !important; object-fit:contain !important;
  border-radius:var(--cat-radius) !important; background:var(--cat-bg) !important; outline:var(--cat-outline) !important; box-shadow:var(--cat-shadow) !important;
  margin-inline:auto !important; transition:all .25s ease;
}

/* عناوين الأقسام — كاملة بدون قص + مسافة أكبر عن الصورة */
.s-block.s-block--categories .swiper-slide
  :is(h3,h4,.title,.name,.category-title,figcaption,.slide__title){
  position:static !important; margin-top:1.1rem !important; /* زيادة المسافة */
  font-size:var(--cat-title) !important; font-weight:700 !important; line-height:1.35 !important; color:#111827 !important;
  text-align:center !important; white-space:normal !important; overflow:visible !important; text-overflow:clip !important;
  max-height:none !important; height:auto !important;
}

/* Hover لطيف */
@media (hover:hover){
  .s-block.s-block--categories .swiper-slide:hover{ transform:translateY(-3px); border-color:#9ca3af !important; }
  .s-block.s-block--categories .swiper-slide:hover img{ transform:scale(1.03); box-shadow:0 6px 16px rgba(0,0,0,.14) !important; }
}

/* 2.5 بطاقة في الجوال مع تباعد متساوٍ */
@media (max-width:640px){
  .s-block.s-block--categories .swiper{ overflow:visible !important; padding-inline-end:16px !important; }
  .s-block.s-block--categories .swiper-slide{ width:calc((100% - var(--cat-gap) * 1.5) / 2.5) !important; }
}

/* ديسكتوب: تباعد متساوٍ (و gap إذا مدعوم) */
@media (min-width:1024px){
  .s-block.s-block--categories .swiper-slide{ margin-inline:calc(var(--cat-gap-desktop)/2) !important; }
  .s-block.s-block--categories .swiper-wrapper{ margin-inline:calc(var(--cat-gap-desktop)*-0.5) !important; gap:var(--cat-gap-desktop) !important; }
}

/* =============================================================
   7) عناوين ضخمة لأقسامنا و"أحدث المنتجات"
   ============================================================= */
html body .s-block.s-block--categories :where(.s-block__header,.block-header,header)
  :is(h2,h3,.s-block__title,.section-title,[class*="title"]),
html body :is(.s-block--latest-products,.latest-products,.s-block.s-block--best-offers)
  :where(.s-block__header,.block-header,header)
  :is(h2,h3,.s-block__title,.section-title,[class*="title"]){
  font-size:clamp(3rem,8vw,6rem) !important; line-height:1.08 !important; font-weight:900 !important;
  letter-spacing:-.02em !important; margin-bottom:.6rem !important;
}
@media (min-width:1600px){
  html body .s-block.s-block--categories :where(.s-block__header,.block-header,header)
    :is(h2,h3,.s-block__title,.section-title,[class*="title"]),
  html body :is(.s-block--latest-products,.latest-products,.s-block.s-block--best-offers)
    :where(.s-block__header,.block-header,header)
    :is(h2,h3,.s-block__title,.section-title,[class*="title"]){
    font-size:clamp(3.2rem,7.5vw,6.8rem) !important;
  }
}

/* =============================================================
   8) مميزات المتجر — دائري + 3 أعمدة دائمًا
   ============================================================= */
.s-block.s-block--features.container{
  --feat-brand:#0F2D3B; --feat-bg:#F3F7FA; --feat-muted:#6B7280;
  --feat-ring:rgba(15,45,59,.14); --feat-glow:rgba(15,45,59,.07);
  background:var(--feat-bg); border-top:4px solid var(--feat-brand);
}
.s-block.s-block--features.container .grid{
  display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:16px !important; padding:16px 10px !important; justify-items:center; align-items:center; overflow-x:hidden !important;
}
.s-block.s-block--features.container .grid.grid-cols-\[repeat\(2,minmax\(0,1fr\)\)\],
.s-block.s-block--features.container .grid.grid-cols-2{ grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
.s-block.s-block--features.container .grid > *{ grid-column:auto !important; }

.s-block--features__item{
  background:transparent !important; border:0 !important; box-shadow:none !important; border-radius:0 !important;
  margin:0 !important; min-width:0 !important; box-sizing:border-box !important; text-align:center; padding:6px 4px !important; text-wrap:balance;
}
.s-block--features__item .feature-icon{
  inline-size:clamp(58px,7vw,72px); block-size:clamp(58px,7vw,72px); border-radius:999px;
  background:radial-gradient(closest-side,#fff 65%,transparent 66%) border-box;
  border:2px solid var(--feat-ring); box-shadow:0 4px 14px var(--feat-glow), inset 0 0 0 6px #fff;
  display:grid; place-items:center; margin-inline:auto; margin-bottom:10px; color:var(--feat-brand) !important;
  position:relative; isolation:isolate; transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.s-block--features__item .feature-icon svg{ width:58%; height:58%; vector-effect:non-scaling-stroke; }
.s-block--features__item .feature-icon svg [stroke]{ stroke:var(--feat-brand) !important; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.s-block--features__item .feature-icon svg [fill]:not([fill="none"]){ fill:var(--feat-brand) !important; }
.s-block--features__item .feature-icon :is(i,span){ color:var(--feat-brand) !important; font-size:1.25em; }
@media (hover:hover){
  .s-block--features__item:hover .feature-icon{
    transform:translateY(-2px); box-shadow:0 8px 24px var(--feat-glow), inset 0 0 0 6px #fff; border-color:rgba(15,45,59,.22);
  }
}
.s-block--features__item :is(h3,h4){
  color:var(--feat-brand) !important; font-weight:800 !important;
  font-size:clamp(.92rem,2.1vw,1.06rem) !important; line-height:1.25 !important; margin:0 !important;
}
.s-block--features__item p{ display:none !important; }
/* عنوان بلوك المميزات */
html body .s-block.s-block--features :where(.s-block__header,.block-header,header)
  :is(h2,h3,.s-block__title,.section-title,[class*="title"]){
  font-size:clamp(2rem,5vw,3rem) !important; line-height:1.15 !important; font-weight:900 !important; letter-spacing:-.02em !important; margin-bottom:.6rem !important;
}