/*------------------ شبكة المنتجات على الجوال ------------------*/

@media (max-width: 767px) {
  .s-products-list-wrapper.s-products-list-filters-results {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .s-products-list-wrapper .product-card {
    width: 100% !important;
    max-width: 100% !important;
  }

  .s-products-list-wrapper .product-card__image {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    overflow: hidden !important;
  }

  .s-products-list-wrapper .product-card__image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .product-card .pn-brand {
    display: block;
    overflow: hidden;
    font-size: 12px !important;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .product-card .pn-rest {
    display: -webkit-box;
    overflow: hidden;
    font-size: 10px !important;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .s-products-list-wrapper .product-card h3,
  .s-products-list-wrapper .product-card h3 a {
    line-height: 1.4 !important;
  }

  .s-products-list-wrapper .product-card p,
  .s-products-list-wrapper .product-card .text-sm {
    font-size: 10px !important;
    line-height: 1.4 !important;
  }

  .s-products-list-wrapper .product-card [class*="price"] {
    font-size: 12px !important;
  }

  .s-products-list-wrapper .product-card [class*="rating"] svg,
  .s-products-list-wrapper .product-card [class*="star"] svg,
  .s-products-list-wrapper .product-card [class*="rating"] i,
  .s-products-list-wrapper .product-card [class*="star"] i {
    width: 10px !important;
    height: 10px !important;
    font-size: 10px !important;
  }

  .s-products-list-wrapper .product-card [class*="rating"],
  .s-products-list-wrapper .product-card [class*="star"] {
    gap: 1px !important;
  }

  .s-products-list-wrapper .product-card button,
  .s-products-list-wrapper .product-card .s-button-element {
    padding: 6px 4px !important;
    font-size: 11px !important;
  }

  .s-products-list-wrapper .product-card [class*="badge"],
  .s-products-list-wrapper .product-card [class*="promotion"] {
    padding: 2px 6px !important;
    font-size: 9px !important;
  }
}


/*------------------ بار منتجين والثالث مجانًا ------------------*/

.promo-progress-bar {
  max-width: 700px;
  margin: 3px auto;
  padding: 4px 10px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
  direction: rtl;
  font-family: inherit;
}

.promo-progress-bar__text {
  margin-bottom: 3px;
  color: #333;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.promo-progress-bar__steps {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  direction: rtl;
}

.promo-progress-bar__steps::before {
  position: absolute;
  top: 24px;
  right: 16.66%;
  left: 16.66%;
  height: 2px;
  background: linear-gradient(
    to left,
    #43b548 var(--steps-progress, 0%),
    #d5d5d5 var(--steps-progress, 0%)
  );
  content: "";
}

.promo-progress-bar__step {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #777;
  font-size: 10px;
  text-align: center;
}

.promo-progress-bar__circle {
  position: relative;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #d5d5d5;
  color: #222;
  font-size: 10px;
  font-weight: 700;
  transition: background-color .3s ease, color .3s ease;
}

.promo-progress-bar__step.is-complete {
  color: #222;
  font-weight: 700;
}

.promo-progress-bar__step.is-complete .promo-progress-bar__circle {
  background: #43b548;
  color: #fff;
}

.promo-progress-bar__step--gift {
  color: #8a6200;
  font-weight: 700;
}

.promo-progress-bar__gift-logo {
  position: absolute;
  top: -17px;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.promo-progress-bar__step--gift .promo-progress-bar__circle {
  overflow: hidden;
  border: 1px solid #e4ae24;
  background: linear-gradient(
    145deg,
    #fff7b0 0%,
    #ffd84a 35%,
    #f0ae00 68%,
    #ffe77a 100%
  );
  color: #5a3900;
  box-shadow:
    0 0 5px rgba(255, 190, 0, .8),
    0 0 11px rgba(255, 190, 0, .45),
    inset 0 1px 3px rgba(255, 255, 255, .95);
  animation: promo-gift-glow 1.5s ease-in-out infinite alternate;
}

.promo-progress-bar__step--gift .promo-progress-bar__circle::after {
  position: absolute;
  top: -30%;
  left: -60%;
  width: 45%;
  height: 160%;
  background: rgba(255, 255, 255, .8);
  content: "";
  transform: rotate(25deg);
  animation: promo-gift-shine 2s ease-in-out infinite;
}

.promo-progress-bar--done .promo-progress-bar__text {
  color: #218838;
}

@keyframes promo-gift-glow {
  from {
    box-shadow:
      0 0 4px rgba(255, 190, 0, .65),
      0 0 8px rgba(255, 190, 0, .35),
      inset 0 1px 3px rgba(255, 255, 255, .9);
  }

  to {
    box-shadow:
      0 0 7px rgba(255, 190, 0, .95),
      0 0 14px rgba(255, 190, 0, .6),
      inset 0 1px 4px rgba(255, 255, 255, 1);
  }
}

@keyframes promo-gift-shine {
  0%, 35% {
    left: -60%;
  }

  75%, 100% {
    left: 130%;
  }
}

@media (max-width: 480px) {
  .promo-progress-bar__text {
    font-size: 11px;
  }

  .promo-progress-bar__step {
    font-size: 9px;
  }

  .promo-progress-bar__gift-logo {
    width: 16px;
    height: 16px;
  }
}


/*------------------ الكوبونات المخصصة ------------------*/

#smart-coupons-box {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid rgba(101, 17, 38, .1);
  border-radius: 12px;
  background: #fffaf3;
  direction: rtl;
}

.smart-coupon-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 12px;
  border: 1px dashed #c89b5b;
  border-radius: 8px;
  transition: all .3s;
}

.smart-coupon-item:last-child {
  margin-bottom: 0;
}

.smart-coupon-item.eligible {
  background: #fff;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .03);
}

.smart-coupon-item.eligible:hover {
  border-color: #651126;
  background: #ead8c2;
}

.smart-coupon-item.not-eligible {
  border-color: #ddd;
  background: #f5f5f5;
  opacity: .6;
  cursor: not-allowed;
  filter: grayscale(100%);
}

.sc-details {
  display: flex;
  flex-direction: column;
}

.sc-details strong {
  margin-bottom: 4px;
  color: #651126;
  font-size: 13px;
}

.not-eligible .sc-details strong {
  color: #777;
}

.sc-details span {
  color: #78686b;
  font-size: 11px;
}

.sc-code {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(101, 17, 38, .08);
  color: #651126;
  font-family: Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
}

.not-eligible .sc-code {
  background: #e0e0e0;
  color: #999;
}


/*------------------ زر ونافذة الكوبونات ------------------*/

salla-cart-coupons.sura-coupons-enhanced .s-cart-coupons-slider {
  display: none !important;
}

.sura-coupons-trigger {
  position: relative;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  margin: 16px 0 0;
  padding: 12px 16px;
  border: 1px solid #f2d782;
  border-radius: 10px;
  background: #fffbed;
  box-shadow: 0 4px 12px rgb(100 17 38 / 8%);
  direction: rtl;
  font: inherit;
  cursor: pointer;
}

.sura-coupons-trigger:hover {
  background: #fff8e6;
}

.sura-coupons-trigger-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
}

.sura-coupons-right {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  gap: 4px;
}

.sura-coupons-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #641126;
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
}

.sura-coupons-title::before {
  display: inline-block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  background: url("https://www.image2url.com/r2/default/images/1790775460939-3f2dd71c-e312-4a98-9eab-df7fdae01708.png")
    center / contain no-repeat;
  content: "";
}

.sura-coupons-count {
  display: block;
  width: 100%;
  color: #777;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.sura-coupons-action {
  flex: 0 0 auto;
  color: #641126;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.sura-coupons-badge {
  position: absolute;
  top: -12px;
  left: 16px;
  z-index: 2;
  padding: 2px 10px;
  border-radius: 8px;
  background: #f04424;
  color: #fff;
  box-shadow: 0 3px 7px rgb(0 0 0 / 18%);
  font-size: 13px;
  font-weight: 800;
  animation: suraCouponsFloat 1.8s ease-in-out infinite;
}

@keyframes suraCouponsFloat {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

.sura-coupons-trigger.sura-coupons-applied {
  border-color: #018749;
  background: #eefbf3;
}

.sura-coupons-trigger.sura-coupons-applied .sura-coupons-title,
.sura-coupons-trigger.sura-coupons-applied .sura-coupons-count,
.sura-coupons-trigger.sura-coupons-applied .sura-coupons-action {
  color: #016b39;
}

.sura-coupons-trigger.sura-coupons-applied .sura-coupons-title::before {
  width: auto;
  height: auto;
  background: none;
  color: #016b39;
  content: "✓";
  font-size: 17px;
  font-weight: 900;
}

.sura-coupons-trigger.sura-coupons-applied .sura-coupons-success-layout {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.sura-coupons-success-mark {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #016b39;
  font-size: 17px;
  font-weight: 900;
}

.sura-coupons-trigger.sura-coupons-applied .sura-coupons-success-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  direction: rtl;
  text-align: right;
}

.sura-coupons-trigger.sura-coupons-applied .sura-coupons-title {
  width: auto;
}

.sura-coupons-trigger.sura-coupons-applied .sura-coupons-title::before {
  display: none;
}

.sura-coupons-trigger.sura-coupons-applied .sura-coupons-count {
  width: auto;
  text-align: right;
}

.sura-coupons-exclusion-note {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff4e5;
  color: #8a5a00;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.sura-coupons-overlay {
  position: fixed;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgb(0 0 0 / 55%);
  direction: rtl;
  inset: 0;
}

.sura-coupons-overlay.is-open {
  display: flex;
}

.sura-coupons-dialog {
  width: min(100%, 540px);
  max-height: 85vh;
  overflow: auto;
  padding: 20px;
  border: 2px solid #e8c65c;
  border-radius: 22px;
  background: #fffaf0;
  color: #222;
  box-shadow: 0 18px 55px rgb(0 0 0 / 28%);
}

.sura-coupons-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sura-coupons-dialog-head h2 {
  margin: 0;
  color: #641126;
  font-size: 21px;
  font-weight: 800;
}

.sura-coupons-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #641126;
  color: #fff;
  font-size: 27px;
  cursor: pointer;
}

.sura-coupons-section-title {
  margin: 18px 0 12px;
  color: #641126;
  font-size: 16px;
  font-weight: 800;
}

.sura-coupons-list .s-cart-coupons-card {
  min-height: 125px;
  margin: 0 0 14px;
  padding: 14px !important;
  border: 2px solid #e8c65c;
  border-radius: 18px !important;
  background: #fffdf8 !important;
  color: #25212a;
  box-shadow: 0 5px 14px rgb(100 17 38 / 10%);
}

.sura-coupons-list .s-cart-coupons-main-amount,
.sura-coupons-list .s-cart-coupons-main-amount span {
  color: #a51e3d;
  font-size: 25px;
  font-weight: 800;
}

.sura-coupons-list .s-cart-coupons-code {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 9px;
  background: #641126;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.sura-coupons-list .s-cart-coupons-bottom-section {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 9px;
  margin-top: 12px;
  padding-top: 10px !important;
  border-top: 1px solid #eadcae;
}

.sura-coupons-list .s-cart-coupons-minimum {
  color: #37313a;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.8;
}

.sura-coupons-saving-number {
  color: #d52b36;
  font-weight: 800;
}

.sura-coupons-list
.s-cart-coupons-card:not(.s-cart-coupons-disabled)
.s-cart-coupons-action {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 11px 12px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: #641126 !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-align: center !important;
}

.sura-coupons-list .s-cart-coupons-action button,
.sura-coupons-list .s-cart-coupons-action salla-button,
.sura-coupons-list .s-cart-coupons-action .s-button-element {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  border-radius: 9px !important;
  background: #641126 !important;
  color: #fff !important;
  text-align: center !important;
}

.sura-coupons-list
.s-cart-coupons-card.s-cart-coupons-disabled {
  border-color: #c9cdd2;
  background: linear-gradient(135deg, #e9ebee, #f7f7f8 70%);
  opacity: 1;
  filter: none;
  box-shadow: none;
}

.sura-coupons-list
.s-cart-coupons-card.s-cart-coupons-disabled
.s-cart-coupons-main-amount,
.sura-coupons-list
.s-cart-coupons-card.s-cart-coupons-disabled
.s-cart-coupons-main-amount span,
.sura-coupons-list
.s-cart-coupons-card.s-cart-coupons-disabled
.s-cart-coupons-code,
.sura-coupons-list
.s-cart-coupons-card.s-cart-coupons-disabled
.s-cart-coupons-minimum,
.sura-coupons-list
.s-cart-coupons-card.s-cart-coupons-disabled
.s-cart-coupons-action {
  color: #626a73;
}

.sura-coupons-list
.s-cart-coupons-card.s-cart-coupons-disabled
.s-cart-coupons-code {
  background: #d9dde1;
}

.sura-coupons-empty {
  padding: 18px;
  border-radius: 12px;
  background: #fff;
  color: #666;
  text-align: center;
}

@media (max-width: 480px) {
  .sura-coupons-dialog {
    padding: 17px;
  }

  .sura-coupons-dialog-head h2 {
    font-size: 19px;
  }
}


/*------------------ بار الشحن المجاني ------------------*/

.sura-shipping-bar {
  margin: 8px 0;
  padding: 6px 10px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  background: #fff;
  direction: rtl;
  font-family: inherit;
}

.sura-shipping-bar__track {
  position: relative;
  height: 32px;
  overflow: hidden;
  border-radius: 3px;
  background: #ededed;
  isolation: isolate;
}

.sura-shipping-bar__fill {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: 3px 0 0 3px;
  background: linear-gradient(
    180deg,
    hsl(var(--fill-hue, 120) 100% 68%),
    hsl(var(--fill-hue, 120) 100% 48%) 48%,
    hsl(var(--fill-hue, 120) 100% 38%)
  );
  box-shadow:
    0 0 7px hsl(var(--fill-hue, 120) 100% 50% / 75%),
    inset 0 1px 2px rgba(255, 255, 255, .7);
  transition: width .45s ease, background .45s ease, box-shadow .45s ease;
}

.sura-shipping-bar__fill::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -45%;
  width: 35%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, .75),
    transparent
  );
  content: "";
  transform: skewX(-20deg);
  animation: sura-shipping-shine 2.2s ease-in-out infinite;
}

.sura-shipping-bar__text {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  color: #292929;
  font-size: 14px !important;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  inset: 0;
}

.sura-shipping-bar__text--base {
  text-shadow: none !important;
}

.sura-shipping-bar__text--filled {
  color: #fff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, .95),
    0 0 5px rgba(0, 0, 0, .8) !important;
  clip-path: inset(0 0 0 calc(100% - var(--progress, 0%)));
}

@keyframes sura-shipping-shine {
  0%, 25% {
    left: -45%;
  }

  75%, 100% {
    left: 120%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sura-shipping-bar__fill,
  .sura-shipping-bar__fill::after {
    animation: none;
    transition: none;
  }

  .promo-progress-bar__step--gift .promo-progress-bar__circle,
  .promo-progress-bar__step--gift .promo-progress-bar__circle::after {
    animation: none;
  }

  .sura-coupons-badge {
    animation: none;
  }
}


/* شبكة صفحة المنتجات في ثيم سيليا: ثلاثة منتجات في الصف على الجوال */
@media (max-width: 767px) {
  .s-products-list-wrapper.s-products-vertical-cards,
  .s-products-list-wrapper.s-products-list-filters-results {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .s-products-list-wrapper.s-products-vertical-cards > *,
  .s-products-list-wrapper.s-products-list-filters-results > * {
    min-width: 0 !important;
  }

  .s-products-list-wrapper.s-products-vertical-cards .product-card,
  .s-products-list-wrapper.s-products-list-filters-results .product-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}




/*---------------CSS_CartDesign------------*/

/* بطاقات سلة سيليا المدمجة — مبنية على HTML المتجر، للجوال فقط */
@media (max-width: 767px) {
  [data-selia="cart-root"] > .main-content > form[id^="item-"] {
    margin: 0 !important;
  }

  [data-selia="cart-root"] .cart-item {
    display: grid !important;
    grid-template-columns: 80px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    column-gap: 14px !important;
    row-gap: 6px !important;
    position: relative !important;
    direction: rtl;
    padding: 12px !important;
    margin: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #ece9e8 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    min-height: 0 !important;
    height: auto !important;
    box-sizing: border-box;
  }

  /* تسطيح أغلفة التخطيط فقط؛ العناصر والأحداث الأصلية تبقى كما هي. */
  [data-selia="cart-root"] .cart-item > div:first-of-type,
  [data-selia="cart-root"] .cart-item > div:first-of-type > div:first-child {
    display: contents !important;
  }

  [data-selia="cart-root"] .cart-item > div:first-of-type > div:first-child > a {
    grid-column: 1 !important;
    grid-row: 1 / 3 !important;
    align-self: center !important;
    width: 80px !important;
    height: 84px !important;
    margin: 0 !important;
    border-radius: 8px;
    overflow: hidden;
  }

  [data-selia="cart-root"] .cart-item > div:first-of-type > div:first-child > a > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  [data-selia="cart-root"] .cart-item > div:first-of-type > div:first-child > div {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    align-self: start;
  }

  [data-selia="cart-root"] .cart-item h1,
  [data-selia="cart-root"] .cart-item h1 a {
    display: block;
    margin: 0 0 5px !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.65 !important;
    color: #242229 !important;
    overflow-wrap: anywhere;
  }

  [data-selia="cart-root"] .cart-item .item-regular-price,
  [data-selia="cart-root"] .cart-item .item-original-price {
    font-size: 11px !important;
    line-height: 1.6 !important;
    color: #92898e !important;
  }

  [data-selia="cart-root"] .cart-item .item-price {
    font-size: 12px !important;
    color: #71686c !important;
  }

  /* الوزن معطّل؛ لا نترك له سطرًا أو مساحة محجوزة. */
  [data-selia="cart-root"] .cart-item .item-weight-row {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  [data-selia="cart-root"] .cart-item .old-offers:has(.offer-name.hidden),
  [data-selia="cart-root"] .cart-item salla-cart-item-offers:empty,
  [data-selia="cart-root"] .cart-item salla-cart-item-offers:has(> .s-cart-item-offers-container:empty) {
    display: none !important;
  }

  /* العرض الفعلي يحتفظ بجميع تفاصيله، بمسافات داخلية أقل. */
  [data-selia="cart-root"] .cart-item .s-cart-item-offers-container {
    margin-top: 8px !important;
  }

  [data-selia="cart-root"] .cart-item .s-cart-item-offers-box,
  [data-selia="cart-root"] .cart-item .s-cart-item-offers-discount {
    margin-bottom: 0 !important;
  }

  [data-selia="cart-root"] .cart-item > div:first-of-type > div:last-child {
    grid-column: 2 !important;
    grid-row: 2 !important;
    display: flex !important;
    flex-direction: row-reverse !important;
    justify-content: space-between !important;
    align-items: center !important;
    align-self: end !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  [data-selia="cart-root"] .cart-item salla-quantity-input {
    display: block !important;
    flex: 0 0 84px !important;
    width: 84px !important;
    margin: 0 0 0 34px !important;
  }

  [data-selia="cart-root"] .cart-item .s-quantity-input-container {
    display: flex !important;
    width: 84px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border: 1px solid #e5e1e2 !important;
    border-radius: 6px !important;
    overflow: hidden;
    background: #faf9f9 !important;
  }

  [data-selia="cart-root"] .cart-item .s-quantity-input-button,
  [data-selia="cart-root"] .cart-item .s-quantity-input-input {
    flex: 0 0 28px !important;
    width: 28px !important;
    min-width: 0 !important;
    height: 32px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 13px !important;
    text-align: center;
    color: #393039 !important;
    background: transparent !important;
    box-sizing: border-box;
  }

  [data-selia="cart-root"] .cart-item .s-quantity-input-input {
    background: #fff !important;
    appearance: textfield;
  }

  [data-selia="cart-root"] .cart-item .s-quantity-input-input::-webkit-inner-spin-button,
  [data-selia="cart-root"] .cart-item .s-quantity-input-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  [data-selia="cart-root"] .cart-item .s-quantity-input-button svg {
    width: 15px !important;
    height: 15px !important;
    fill: currentColor;
  }

  [data-selia="cart-root"] .cart-item > div:first-of-type > div:last-child > p {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    line-height: 16px !important;
    font-weight: 700 !important;
    color: #651126 !important;
    flex-shrink: 0;
    white-space: nowrap;
  }

  [data-selia="cart-root"] .cart-item > div:first-of-type > div:last-child > p > span:first-child {
    display: block;
    margin-bottom: 1px;
    font-size: 9px !important;
    line-height: 12px !important;
    font-weight: 400;
    color: #8b8488;
  }

  /* زر الحذف الأصلي، بتنسيق صغير بجانب الكمية. */
  [data-selia="cart-root"] .cart-item > span:last-child {
    position: absolute !important;
    top: auto !important;
    right: auto !important;
    left: 12px !important;
    bottom: 13px !important;
    margin: 0 !important;
    width: 28px !important;
    height: 34px !important;
  }

  [data-selia="cart-root"] .cart-item .btn--delete.s-button-element {
    display: grid !important;
    place-items: center;
    width: 28px !important;
    height: 34px !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 1px solid #e5e1e2 !important;
    border-radius: 6px !important;
    background: #faf9f9 !important;
    color: #71686c !important;
    box-shadow: none !important;
  }

  [data-selia="cart-root"] .cart-item .btn--delete .sicon-cancel::before {
    content: '' !important;
    display: block;
    width: 15px;
    height: 17px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M9 6V3h6v3M5 6l1 15h12l1-15M10 10v7M14 10v7'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M9 6V3h6v3M5 6l1 15h12l1-15M10 10v7M14 10v7'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  }

  /* عبارة العرض بحجم صغير، مع مساحة أكبر للنص بجانب أيقونة الهدية. */
  [data-selia="cart-root"] .cart-item .s-cart-item-offers-details {
    gap: 5px !important;
    align-items: flex-start !important;
  }

  [data-selia="cart-root"] .cart-item .s-cart-item-offers-details > div {
    flex: 1 1 auto;
    min-width: 0;
  }

  [data-selia="cart-root"] .cart-item .s-cart-item-offers-title {
    font-size: clamp(9px, 2.75vw, 11px) !important;
    line-height: 16px !important;
    font-weight: 500 !important;
    margin: 0 0 4px !important;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
  }

  [data-selia="cart-root"] .cart-item .s-cart-item-offers-icon {
    flex: 0 0 14px;
    width: 14px;
    line-height: 16px;
  }

  [data-selia="cart-root"] .cart-item .s-cart-item-offers-icon svg {
    width: 14px !important;
    height: 14px !important;
  }

  /* وضوح المجانية والخصم */
  [data-selia="cart-root"] .cart-item .s-cart-item-offers-free-label {
    color: #dc2626 !important;
    font-weight: 700 !important;
  }

  [data-selia="cart-root"] .cart-item .s-cart-item-offers-discount {
    color: #dc2626 !important;
  }

  [data-selia="cart-root"] .cart-item .s-cart-item-offers-discount > span {
    display: inline-block;
    color: #dc2626 !important;
    font-weight: 800 !important;
    /* تكبير بصري فقط؛ مساحة السطر وحجم البطاقة لا يتغيران. */
    transform: scale(1.33);
    transform-origin: right center;
    vertical-align: baseline;
    white-space: nowrap;
  }

  [data-selia="cart-root"] .cart-item .s-cart-item-offers-discount .sicon-sar {
    font-size: 12px !important;
  }
}



/*-------------CSS_Flags_Brands--------*/

/* تصغير روابط دول المحاصيل والبراندات أعلى صفحات التصنيف — للجوال */
@media (max-width: 767px) {
  .products-index .s-before-products-list .s-block--circle-links {
    margin-top: 12px !important;
    margin-bottom: 12px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .products-index .s-before-products-list .s-block--circle-links .swiper-slide {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    flex: 0 0 72px !important;
    height: auto !important;
    padding: 0 !important;
  }

  .products-index .s-before-products-list .s-block--circle-links .swiper-slide > a {
    display: block;
    padding: 0 !important;
    text-align: center;
  }

  .products-index .s-before-products-list .s-block--circle-links .circle-links__image-wrap {
    width: 48px !important;
    height: 48px !important;
    margin: 0 auto !important;
  }

  .products-index .s-before-products-list .s-block--circle-links .circle-links__image-wrap img {
    display: block;
    width: 48px !important;
    height: 48px !important;
    min-width: 0 !important;
    max-width: 48px !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .products-index .s-before-products-list .s-block--circle-links .circle-links__item-title {
    margin: 6px 0 0 !important;
    font-size: 12px !important;
    line-height: 18px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-align: center;
  }

  .products-index .s-before-products-list .s-block--circle-links .circle-links__item-subtitle:empty {
    display: none !important;
    margin: 0 !important;
  }
}



/*---ازالة الفراع فوق بانر 2 وواحد مجانا---*/
/* تقليل الفراغ بين الهيدر، شريط التنقّل، وأول بانر في صفحات التصنيف */
@media (max-width: 767px) {
  .products-index > .container--breadcrumbs {
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .products-index > .container--breadcrumbs > .breadcrumbs {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  .products-index > .container--breadcrumbs .s-breadcrumb-wrapper {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .products-index > .s-before-products-list {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .products-index > .s-before-products-list > .s-block--fixed-banner:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

/*------CSS_ShippingDate---------*/
/*------------------ مدة التوصيل في بطاقات المنتجات ------------------*/

custom-salla-product-card .sura-delivery-estimate {
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  min-width: 0;
  margin: 10px 0 3px;
  padding: 8px 5px 5px;
  border: 1px solid #eee3e6;
  border-radius: 6px;
  background: #fcf8f9;
  color: #52525b;
  direction: rtl;
  text-align: right;
  font-family: inherit;
  font-size: 11px;
  line-height: 1.5;
}

/* كلمة التوصيل — يمين الإطار */
custom-salla-product-card .sura-delivery-estimate__heading {
  position: absolute;
  top: 0;
  inset-inline-start: 5px;
  transform: translateY(-50%);
  padding: 0 3px;
  background: #fcf8f9;
  color: #651326;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

/* أيقونة الشاحنة — يسار الإطار */
custom-salla-product-card .sura-delivery-estimate::after {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-end: 5px;
  transform: translateY(-50%);
  width: 26px;
  height: 16px;
  border-radius: 3px;
  background-color: #fcf8f9;
  background-image: url("https://www.image2url.com/r2/default/images/1791725567140-01d60cc6-5aee-4e40-954d-755dcc49dfd4.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
  pointer-events: none;
}

/* سطور مدة التوصيل */
custom-salla-product-card .sura-delivery-estimate__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  column-gap: 3px;
  row-gap: 0;
  margin: 0;
  padding: 0;
}

custom-salla-product-card .sura-delivery-estimate__label,
custom-salla-product-card .sura-delivery-estimate__time {
  white-space: nowrap;
  font-size: inherit;
  line-height: inherit;
}

custom-salla-product-card .sura-delivery-estimate__time {
  color: #651326;
  font-weight: 700;
}

/* 24 و2 يمين — 48 و6 يسار */
custom-salla-product-card .sura-delivery-estimate__range {
  display: inline-flex;
  flex-direction: row;
  direction: rtl;
  unicode-bidi: isolate;
  align-items: baseline;
}

/* تنسيق الجوال */
@media (max-width: 767px) {
  custom-salla-product-card .sura-delivery-estimate {
    font-size: 10px;
    padding: 8px 3px 5px;
  }
}


/*---------------------------------*/

/* إظهار أسماء المنتجات كاملة على الجوال */
@media (max-width: 767px) {
  custom-salla-product-card .product-card__title,
  custom-salla-product-card .product-card__title a,
  custom-salla-product-card .pn-brand,
  custom-salla-product-card .pn-rest {
    display: block !important;
    width: 100%;
    min-width: 0;
    height: auto !important;
    max-height: none !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    -webkit-box-orient: initial !important;
    word-break: normal !important;
    overflow-wrap: anywhere;
    line-height: 1.45 !important;
    text-align: center;
  }

  custom-salla-product-card .product-card__title,
  custom-salla-product-card .product-card__title a {
    font-size: 11px !important;
  }

  custom-salla-product-card .pn-brand {
    font-size: 12px !important;
    font-weight: 700;
  }

  custom-salla-product-card .pn-rest {
    margin-top: 3px;
    font-size: 10px !important;
    font-weight: 400;
  }
}

/*----------CSS_FontEdit-----------*/

/* اسم المنتج وتفاصيله بخط عريض */
custom-salla-product-card .product-card__title,
custom-salla-product-card .product-card__title a,
custom-salla-product-card .pn-brand,
custom-salla-product-card .pn-rest {
  font-weight: 700 !important;
}

/* السعر بخط عريض ولون أحمر */
custom-salla-product-card .product-card__price .total-price {
  font-weight: 800 !important;
  color: #dc2626 !important;
}

custom-salla-product-card .product-card__price .total-price i {
  color: #dc2626 !important;
}


/*-----------CSS_Pic_Viewer_Fix-----------*/
/* إبراز أزرار عارض صور المنتج */
.fslightbox-container .fslightbox-toolbar {
  top: calc(12px + env(safe-area-inset-top, 0px)) !important;
  right: calc(12px + env(safe-area-inset-right, 0px)) !important;
  left: auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  z-index: 20 !important;
}

/* خلفية واضحة ومساحة لمس أكبر */
.fslightbox-container .fslightbox-toolbar-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 44px !important;
  box-sizing: border-box !important;
  width: 44px !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #e8d9dd !important;
  border-radius: 50% !important;
  background: #fff !important;
  color: #651326 !important;
  opacity: 1 !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35) !important;
  cursor: pointer;
  touch-action: manipulation;
}

/* حجم الأيقونات */
.fslightbox-container .fslightbox-toolbar-button svg {
  width: 24px !important;
  height: 24px !important;
  color: #651326 !important;
  opacity: 1 !important;
}

/* لون الإغلاق والتكبير */
.fslightbox-container .fslightbox-toolbar-button svg path {
  fill: #651326 !important;
}

.fslightbox-container .fslightbox-toolbar-button:focus-visible {
  outline: 2px solid #fff !important;
  outline-offset: 3px;
}