/* رقمي ستور — الألوان والمقاسات */
:root {
  --raqmi-purple: #702dff;
  --raqmi-purple-dark: #421589;
  --raqmi-ink: #190c38;
  --raqmi-lavender: #f8f3ff;
  --raqmi-border: #e7dafa;
  --raqmi-curve: clamp(8px, 1.3vw, 20px);
}

/* الهيدر */
header.site-header .site-header__bar {
  background: linear-gradient(to right, #702dff, #8b55ff, #a67eff) !important;
  border-radius: 0 0 50% 50% /
    0 0 var(--raqmi-curve) var(--raqmi-curve) !important;
}

header.site-header .site-header__bar-inner {
  background: transparent !important;
  color: #fff;
}

header.site-header .site-header__bar-inner :is(
  .header-action,
  .header-action i,
  .header-action svg,
  .site-header__actions > :is(button, a),
  salla-cart-summary,
  salla-user-menu,
  salla-user-menu i,
  salla-user-menu svg
) {
  color: #fff !important;
}

header.site-header .site-header__bar-inner
:is(.header-action, salla-user-menu)
:is(svg[stroke], svg [stroke]):not([stroke="none"]) {
  stroke: currentColor !important;
}

header.site-header .site-header__bar-inner
:is(.header-action, salla-user-menu)
:is(svg[fill], svg [fill]):not([fill="none"]) {
  fill: currentColor !important;
}

header.site-header .site-header__burger > span {
  background-color: #fff !important;
}

header.site-header .site-header__bar-inner
.header-action:is(:hover, :focus-visible) {
  background-color: var(--raqmi-purple-dark) !important;
  color: #fff !important;
}

/* البنر الأول بعرض الصفحة مع تقويسة من فوق وتحت */
body.index #main-content > :nth-child(1 of .s-block--fixed-banner) {
  margin-top: 6px !important;
  padding-inline: 0 !important;
}

body.index #main-content > :nth-child(1 of .s-block--fixed-banner) > .container {
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
}

body.index #main-content > :nth-child(1 of .s-block--fixed-banner) .banner--fixed {
  display: block;
  width: 100%;
  border-radius: 0 !important;
  clip-path: shape(
    from 0 0,
    curve to 100% 0
      with 25% var(--raqmi-curve) / 75% var(--raqmi-curve),
    line to 100% 100%,
    curve to 0 100%
      with 75% calc(100% - var(--raqmi-curve))
         / 25% calc(100% - var(--raqmi-curve)),
    close
  );
}

body.index #main-content > :nth-child(1 of .s-block--fixed-banner) .banner--fixed img {
  display: block;
  width: 100% !important;
  height: auto !important;
  border-radius: 0 !important;
}

/* أيقونات شريط التصنيفات */
.s-block--main-links :is(.slide--cat-entry__media, .slide--cat-entry__media img) {
  border-radius: 0 !important;
}

.s-block--main-links .slide--cat-entry__media img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
}

/* سلايدر بطاقات الأقسام */
.s-block--photos-slider {
  --raqmi-card-width: clamp(200px, 19vw, 260px);
}

.s-block--photos-slider .s-photos-slider__slide {
  box-sizing: border-box;
  flex: 0 0 var(--raqmi-card-width) !important;
  width: var(--raqmi-card-width) !important;
  height: auto !important;
  aspect-ratio: 3 / 4 !important;
}

.s-block--photos-slider :is(
  .s-photos-stage, .s-photos-stage__viewport, .s-photos-stage__track
) {
  height: auto !important;
  aspect-ratio: auto !important;
}

.s-block--photos-slider .s-photos-slider__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center;
}

/* بطاقات المنتجات في الرئيسية والتصنيفات */
#main-content .s-product-card-entry {
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--raqmi-border);
  border-radius: 18px;
  box-shadow: 0 5px 16px #4215890b;
}

#main-content .s-product-card-entry .s-product-card-image {
  overflow: hidden;
  background: var(--raqmi-lavender);
  border-radius: 17px 17px 0 0;
}

#main-content .s-product-card-entry .s-product-card-image img {
  object-fit: contain !important;
}

#main-content .s-product-card-entry .s-product-card-content {
  padding: clamp(10px, 1.4vw, 16px);
}

#main-content .s-product-card-entry .s-product-card-content-title a {
  color: var(--raqmi-ink);
  font-weight: 800;
}

/* صفحة تفاصيل المنتج */
#main-content [id^="product-"]:has(> .product-gallery + .main-content) {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(16px, 2.4vw, 32px);
  padding: clamp(14px, 2.5vw, 30px);
  border: 1px solid var(--raqmi-border);
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 10%, #eadbff, transparent 48%),
    linear-gradient(145deg, #f7f0ff, #fff);
  box-shadow: 0 12px 36px #4215890c;
}

#main-content [id^="product-"]:has(> .product-gallery + .main-content)
> :is(.product-gallery, .main-content) {
  box-sizing: border-box;
  position: relative !important;
  top: auto !important;
  width: 100% !important;
  min-width: 0;
  margin-inline: 0 !important;
  padding-bottom: 0 !important;
}

#main-content [id^="product-"] > .product-gallery .product-gallery__poster {
  border-radius: 20px;
  overflow: hidden;
}

#main-content [id^="product-"]:has(> .product-gallery + .main-content)
> .main-content {
  display: flex;
  flex-direction: column;
  overflow: visible;
}

#main-content [id^="product-"] > .main-content h1 {
  color: var(--raqmi-ink);
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 800;
  line-height: 1.4;
}

/* السعر */
#main-content [id^="product-"] > .main-content > div:has(> div .sicon-sar) {
  box-sizing: border-box;
  padding: 12px 16px;
  border: 1px solid var(--raqmi-border);
  border-radius: 16px;
  background: #fff;
}

#main-content [id^="product-"] > .main-content > div:has(> div .sicon-sar) p {
  color: var(--raqmi-ink);
  font-size: clamp(23px, 3vw, 36px);
}

/* الوصف بعد خيارات الشراء */
#main-content [id^="product-"] > .main-content > .product__description {
  order: 1;
  margin: 20px 0 0;
  padding: clamp(14px, 2vw, 22px);
  border: 1px solid var(--raqmi-border);
  border-radius: 16px;
  background: #fff;
  color: var(--raqmi-ink);
}

#main-content :is(.product-form, .s-product-card-entry) .s-button-primary {
  border-radius: 12px;
}

/* الفوتر */
footer.store-footer {
  background: linear-gradient(180deg, #faf7ff, #f0e6ff) !important;
  color: #493761 !important;
  border-top: 1px solid var(--raqmi-border);
}

footer.store-footer .store-footer__inner {
  border-color: var(--raqmi-border);
}

footer.store-footer :is(h3, .copyright-text) {
  color: var(--raqmi-ink) !important;
}

footer.store-footer a {
  color: #542299;
  text-underline-offset: 4px;
}

footer.store-footer a:is(:hover, :focus-visible) {
  color: var(--raqmi-purple-dark);
  text-decoration: underline;
}

/* الجوال */
@media (max-width: 767px) {
  .s-block--photos-slider {
    --raqmi-card-width: clamp(150px, 53vw, 205px);
  }

  #main-content [id^="product-"]:has(> .product-gallery + .main-content) {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    border-radius: 20px;
  }
}
@media (max-width: 767px) {
  /* إظهار شريط الهيدر في صفحات الجوال */
  header.site-header .site-header__bar {
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
  }
  

  /* القائمة، ثم الشعار، ثم أيقونات البحث والسلة والحساب */
  header.site-header .site-header__bar-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 4px;
    min-height: 64px;
  }

  header.site-header .site-header__brand {
    justify-self: center;
    min-width: 0;
  }

  header.site-header .site-header__brand img {
    max-width: 100%;
  }

  header.site-header .site-header__actions {
    display: flex !important;
    align-items: center;
    gap: 2px;
  }

  header.site-header .site-header__nav-toggle button,
  header.site-header .site-header__search {
    display: inline-grid !important;
  }

  header.site-header .site-header__actions salla-cart-summary {
    display: inline-flex !important;
  }

  header.site-header .site-header__actions salla-user-menu {
    display: inline-flex !important;
    position: static !important;
    visibility: visible !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* توحيد لون الأيقونات وتوفير مساحة على الشاشات الصغيرة */
  header.site-header .site-header__bar-inner :is(
    .header-action,
    .s-user-menu-trigger,
    .s-user-menu-login-btn
  ) {
    min-width: 36px;
    min-height: 40px;
    color: #fff !important;
  }

  header.site-header .site-header__bar-inner :is(
    .header-action,
    .s-user-menu-trigger,
    .s-user-menu-login-btn
  ):is(:hover, :focus-visible) {
    background-color: #421589 !important;
  }
}
@media (max-width: 767px) {
  /* الشعار يمين، والأيقونات متجاورة يسار */
  header.site-header .site-header__bar-inner {
    grid-template-columns: minmax(0, 1fr) 42px auto !important;
    gap: 0 !important;
  }

  header.site-header .site-header__brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  header.site-header .site-header__nav-toggle {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
  }

  header.site-header .site-header__actions {
    grid-column: 3;
    grid-row: 1;
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0 !important;
  }

  /* مساحات متساوية للأزرار */
  header.site-header .site-header__actions > *,
  header.site-header .site-header__bar-inner .header-action {
    box-sizing: border-box;
    width: 42px;
    min-width: 42px;
    flex: 0 0 42px;
  }

  header.site-header .site-header__actions > * {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  header.site-header .site-header__bar-inner :is(
    .header-action,
    .s-user-menu-trigger,
    .s-user-menu-login-btn,
    .s-cart-summary-wrapper
  ) {
    color: #fff !important;
  }

  /* تلوين الرسم نفسه، خصوصًا أيقونة الحساب الرمادية */
  header.site-header .site-header__bar-inner
  :is(.header-action, .s-user-menu-trigger, .s-user-menu-login-btn, .s-cart-summary-wrapper)
  :is(i, svg) {
    color: #fff !important;
  }

  header.site-header .site-header__bar-inner
  :is(.header-action, .s-user-menu-trigger, .s-user-menu-login-btn, .s-cart-summary-wrapper)
  :is(svg[stroke], svg [stroke]):not([stroke="none"]) {
    stroke: #fff !important;
  }

  header.site-header .site-header__bar-inner
  :is(.header-action, .s-user-menu-trigger, .s-user-menu-login-btn, .s-cart-summary-wrapper)
  :is(svg[fill], svg [fill]):not([fill="none"]) {
    fill: #fff !important;
  }
}
@media (max-width: 767px) {
  header.site-header .site-header__bar-inner {
    grid-template-columns: 42px minmax(0, 1fr) auto !important;
    gap: 4px !important;
  }

  header.site-header .site-header__nav-toggle {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  header.site-header .site-header__brand {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
  }

  header.site-header .site-header__actions {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }
}
@media (max-width: 767px) {
  /* توسيط البحث والسلة والحساب في ثلاث مساحات متساوية */
  header.site-header .site-header__actions {
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: 42px;
    align-items: center;
    justify-items: center;
    gap: 0 !important;
  }

  header.site-header .site-header__actions :is(
    .site-header__search,
    .s-cart-summary-wrapper,
    .s-user-menu-trigger,
    .s-user-menu-login-btn
  ) {
    box-sizing: border-box;
    display: inline-grid !important;
    place-items: center;
    width: 42px !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50%;
    color: #fff !important;
    background: transparent !important;
  }

  /* تبييض أيقونة الحساب حتى لو كان لونها داخل الرسم نفسه */
  header.site-header .site-header__actions
  :is(.s-user-menu-trigger, .s-user-menu-login-btn)
  :is(svg, i, img) {
    filter: brightness(0) invert(1) !important;
  }

  /* نفس تأثير التركيز للأزرار الثلاثة */
  header.site-header .site-header__actions :is(
    .site-header__search,
    .s-cart-summary-wrapper,
    .s-user-menu-trigger,
    .s-user-menu-login-btn
  ):is(:hover, :focus-visible) {
    background: #421589 !important;
  }
}
@media (max-width: 767px) {
  header.site-header .site-header__actions
  :is(.s-user-menu-trigger, .s-user-menu-login-btn) {
    pointer-events: auto !important;
    cursor: pointer;
  }

  header.site-header .site-header__actions
  :is(.s-user-menu-trigger, .s-user-menu-login-btn)
  :is(svg, i, img) {
    pointer-events: none !important;
  }
}
/* قسم آراء العملاء */
.s-block--custom-testimonials {
  background: #fff !important;
  padding-block: clamp(24px, 4vw, 48px);
}

.s-block--custom-testimonials .s-testimonials__title {
  color: #702dff !important;
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 800;
  text-align: start;
}

/* مسافة بين البطاقات ومساحة للظل */
.s-block--custom-testimonials :has(> .testimonial-card) {
  gap: 16px;
  padding-block: 6px 18px;
}

.s-block--custom-testimonials .testimonial-card {
  box-sizing: border-box;
  flex: 0 0 min(86%, 330px) !important;
  gap: 10px;
  padding: 16px 18px;
  border: 0;
  border-radius: 20px;
  background: #7745dd !important;
  color: #fff;
  box-shadow: 0 8px 16px #35145d30;
  text-align: start;
  scroll-snap-align: start;
}

.s-block--custom-testimonials .testimonial-card__head {
  justify-content: flex-start;
}

.s-block--custom-testimonials .testimonial-card__stars svg {
  color: #ffffff50 !important;
}

.s-block--custom-testimonials .testimonial-card__stars svg.is-on {
  color: #fff04a !important;
}

.s-block--custom-testimonials :is(
  .testimonial-card__text,
  .testimonial-card__name
) {
  color: #fff !important;
}

.s-block--custom-testimonials .testimonial-card__text {
  margin: 0;
  line-height: 1.8;
}

.s-block--custom-testimonials .testimonial-card__person {
  margin-top: auto;
}

.s-block--custom-testimonials .testimonial-card__person time {
  color: #f2eaff;
  font-size: 12px;
}

.s-block--custom-testimonials :is(
  .testimonial-card__avatar,
  .testimonial-card__quote
) {
  display: none !important;
}

@media (min-width: 768px) {
  .s-block--custom-testimonials .testimonial-card {
    flex-basis: calc((100% - 16px) / 2) !important;
  }
}

@media (min-width: 1024px) {
  .s-block--custom-testimonials .testimonial-card {
    flex-basis: calc((100% - 48px) / 4) !important;
  }
}