/* ==========================================================================
   SaharShop Product Detail V2 — pixel-close to sahar-product-v2
   Namespace: .sp-*  |  Scoped to body#product only
   Real catalog images only; header/footer untouched.
   ========================================================================== */

body.lang-rtl#product {
  --sp-ink: #101830;
  --sp-muted: #555c6f;
  --sp-line: #e2e2ed;
  --sp-pink: #ed0068;
  --sp-pink-deep: #c50052;
  --sp-cta-top: #fa0879;
  --sp-radius: 23px;
  --sp-shadow: 0 8px 22px rgba(36, 42, 96, 0.06);
  color: var(--sp-ink);
  background:
    radial-gradient(ellipse at 80% 10%, #f9f2fa, transparent 48%),
    radial-gradient(ellipse at 10% 50%, #f0effb, transparent 60%),
    #f5f6fc;
}

body.lang-rtl#product #main.l-wrapper.protheme-0,
body.lang-rtl#product #main.protheme-0 {
  max-width: 1550px !important;
  width: 95% !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
  box-sizing: border-box !important;
}

body.lang-rtl#product .sp-svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  vertical-align: middle;
}

/* —— Hero 40:30:30 —— */
@media (min-width: 992px) {
  body.lang-rtl#product #main.protheme-0 > .sp-hero.row,
  body.lang-rtl#product #main.protheme-0 > .sp-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1.32fr) minmax(0, 1.1fr) minmax(0, 1fr) !important;
    gap: 30px !important;
    align-items: start;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.lang-rtl#product #main.protheme-0 > .sp-hero > [class*="col-"],
  body.lang-rtl#product #main.protheme-0 > .sp-hero > .sp-gallery,
  body.lang-rtl#product #main.protheme-0 > .sp-hero > .sp-info,
  body.lang-rtl#product #main.protheme-0 > .sp-hero > .sp-buy {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: unset !important;
    padding: 0 !important;
    float: none !important;
  }

  body.lang-rtl#product #main.protheme-0 .sp-buy .product-actions {
    position: sticky;
    top: 96px;
  }
}

@media (min-width: 1500px) {
  body.lang-rtl#product #main.protheme-0 > .sp-hero {
    gap: 40px !important;
  }
}

@media (max-width: 991.98px) {
  body.lang-rtl#product #main.protheme-0 > .sp-hero {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
  }
  body.lang-rtl#product #main.protheme-0 > .sp-hero > .sp-buy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  body.lang-rtl#product {
    padding-bottom: 84px;
  }
  body.lang-rtl#product #main.protheme-0 > .sp-hero {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  body.lang-rtl#product #main.protheme-0 > .sp-hero > .sp-buy {
    grid-column: auto;
  }
}

/* Panels */
body.lang-rtl#product .sp-panel,
body.lang-rtl#product .sp-gallery .page-content--product,
body.lang-rtl#product .sp-buy .product-actions {
  background: linear-gradient(145deg, #fff, #fbfaff) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: var(--sp-radius) !important;
  box-shadow: var(--sp-shadow) !important;
}

/* Gallery */
body.lang-rtl#product .sp-gallery .page-content--product {
  padding: 8px !important;
  margin-bottom: 0 !important;
}

body.lang-rtl#product .sp-gallery .images-container,
body.lang-rtl#product .sp-gallery .product-cover,
body.lang-rtl#product .sp-gallery .products-imagescover {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 17px !important;
}

body.lang-rtl#product .sp-gallery .product-cover,
body.lang-rtl#product .sp-gallery .products-imagescover {
  position: relative;
  aspect-ratio: 1.12;
  background: #fff !important;
  border-radius: 17px !important;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px #eeedf4 !important;
}

body.lang-rtl#product .sp-gallery .product-cover img,
body.lang-rtl#product .sp-gallery .js-qv-product-cover,
body.lang-rtl#product .sp-gallery .products-imagescover img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  mix-blend-mode: normal;
  background: transparent;
  border-radius: 0;
  aspect-ratio: auto;
}

body.lang-rtl#product .sp-gallery .product-images,
body.lang-rtl#product .sp-gallery .js-qv-mask,
body.lang-rtl#product .sp-gallery .thumb-container {
  display: flex !important;
  gap: 10px;
  padding: 14px 12px 4px;
  flex-wrap: wrap;
}

body.lang-rtl#product .sp-gallery .js-thumb,
body.lang-rtl#product .sp-gallery .thumb,
body.lang-rtl#product .sp-gallery .product-images img {
  width: 74px !important;
  height: 74px !important;
  object-fit: contain !important;
  background: #fff;
  border: 1px solid #e3e4ed !important;
  border-radius: 11px !important;
  padding: 3px;
}

body.lang-rtl#product .sp-gallery .js-thumb.selected,
body.lang-rtl#product .sp-gallery .selected img,
body.lang-rtl#product .sp-gallery .thumb.selected {
  border-color: #f00670 !important;
  box-shadow: none;
}

/* Hide nested card chrome / clutter */
body.lang-rtl#product .sp-info .qrgenerator-wrapper,
body.lang-rtl#product .sp-info .pshare-wrapper,
body.lang-rtl#product .sp-info .ptags-wrapper,
body.lang-rtl#product .sp-info .product-additional-info,
body.lang-rtl#product .sp-info .product-reference {
  display: none !important;
}

/* Info column — no card */
body.lang-rtl#product .sp-info .sp-info-inner,
body.lang-rtl#product .sp-info .page-content--product {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 3px 2px !important;
  margin: 0 !important;
}

body.lang-rtl#product .sp-info h1.h1 {
  font-size: clamp(20px, 2vw, 34px);
  line-height: 1.6;
  margin: 0 0 6px;
  font-weight: 900;
  color: var(--sp-ink);
  letter-spacing: 0;
}

body.lang-rtl#product .sp-meta {
  color: var(--sp-muted);
  font-size: 13px;
  margin: 0 0 10px;
}

body.lang-rtl#product .sp-short-desc,
body.lang-rtl#product .sp-info .si-short-desc {
  margin: 10px 0 18px;
  max-height: none;
  overflow: visible;
  font-size: 14px;
  line-height: 1.85;
  color: var(--sp-ink);
}

body.lang-rtl#product .sp-facts {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

body.lang-rtl#product .sp-facts > div {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.5px;
  line-height: 1.7;
}

body.lang-rtl#product .sp-facts .sp-svg {
  color: #e90069;
  width: 19px;
  height: 19px;
  margin-top: 3px;
}

body.lang-rtl#product .sp-weight {
  border-top: 1px solid var(--sp-line);
  margin-top: 20px;
  padding-top: 12px;
  display: grid;
  gap: 8px;
}

body.lang-rtl#product .sp-weight b {
  font-size: 13px;
}

body.lang-rtl#product .sp-weight span {
  width: max-content;
  padding: 4px 34px;
  border: 1px solid #ec0069;
  color: #d50060;
  border-radius: 12px;
  font-weight: 700;
}

body.lang-rtl#product .sp-stock {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0a7a3e;
  font-weight: 800;
  font-size: 13px;
}

body.lang-rtl#product .sp-stock.is-oos {
  color: #b00020;
}

/* Buy box */
body.lang-rtl#product .sp-buy .product-actions {
  padding: 23px 20px !important;
  background: linear-gradient(145deg, #fff, #faf2fb) !important;
}

body.lang-rtl#product .sp-buy .s26-buybar,
body.lang-rtl#product .sp-buy .product-act-container {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  width: 100%;
}

body.lang-rtl#product .sp-buy .product-prices {
  margin: 0 !important;
}

body.lang-rtl#product .sp-buy .current-price-display {
  font-size: clamp(21px, 2.1vw, 34px) !important;
  font-weight: 900 !important;
  color: #e50062 !important;
}

body.lang-rtl#product .sp-buy .regular-price {
  color: var(--sp-muted) !important;
  text-decoration: line-through;
  font-size: 0.95rem;
}

body.lang-rtl#product .sp-buy .discount,
body.lang-rtl#product .sp-buy .discount-percentage {
  background: var(--sp-pink) !important;
  color: #fff !important;
  border-radius: 40px !important;
  padding: 2px 12px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Qty stacked above CTA — pill style */
body.lang-rtl#product .sp-buy .product-quantity {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}

body.lang-rtl#product .sp-buy .product-quantity > .qty,
body.lang-rtl#product .sp-buy .product-quantity > .add {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 auto !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.lang-rtl#product .sp-buy .qty .bootstrap-touchspin,
body.lang-rtl#product .sp-buy .qty .input-group {
  display: flex !important;
  direction: rtl;
  align-items: center;
  justify-content: center;
  width: max-content !important;
  margin: 0 auto;
  border: 1px solid #e7e5ef;
  border-radius: 32px;
  box-shadow: 0 2px 5px rgba(20, 26, 60, 0.03);
  background: #fff;
  padding: 0;
  gap: 0;
}

body.lang-rtl#product .sp-buy .qty .btn,
body.lang-rtl#product .sp-buy .js-touchspin {
  width: 48px !important;
  height: 46px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #fff !important;
  font-size: 23px !important;
  font-weight: bold;
  box-shadow: none !important;
  color: var(--sp-ink) !important;
}

body.lang-rtl#product .sp-buy #quantity_wanted {
  width: 52px !important;
  min-width: 52px !important;
  border: 0 !important;
  background: transparent !important;
  text-align: center;
  font-weight: 800;
  box-shadow: none !important;
  height: 46px !important;
}

body.lang-rtl#product .sp-buy .btn-add-to-cart,
body.lang-rtl#product .sp-buy .add-to-cart {
  width: 100% !important;
  min-height: 49px !important;
  border-radius: 16px !important;
  border: 0 !important;
  background: linear-gradient(180deg, var(--sp-cta-top), var(--sp-pink-deep)) !important;
  color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 7px 15px rgba(204, 0, 85, 0.15) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

body.lang-rtl#product .sp-buy .product-add-to-cart {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

body.lang-rtl#product .sp-buy #product-availability,
body.lang-rtl#product .sp-buy .js-product-availability {
  display: none !important;
}

body.lang-rtl#product .sp-buy #product-availability.product-unavailable,
body.lang-rtl#product .sp-buy #product-availability.product-last-items {
  display: block !important;
  margin-top: 8px !important;
  padding: 8px 12px !important;
  height: auto !important;
}

body.lang-rtl#product .sp-buy .product-variants:empty,
body.lang-rtl#product .sp-buy .tax-shipping-delivery-label:empty,
body.lang-rtl#product .sp-buy .si-buy-ref {
  display: none !important;
}

/* Buy-box service list */
body.lang-rtl#product .sp-buy-services {
  border-top: 1px solid #e2ddec;
  margin-top: 18px;
  padding-top: 18px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 15px 10px;
  font-size: 13px;
  font-weight: 700;
}

body.lang-rtl#product .sp-buy-services .sp-svg {
  color: #ed0068;
  width: 22px;
  height: 22px;
}

/* Wishlist via hook — outline style when present */
body.lang-rtl#product .sp-buy .product-quantity [class*="wishlist"],
body.lang-rtl#product .sp-buy .product-quantity .wishlist,
body.lang-rtl#product .sp-buy a.wishlist,
body.lang-rtl#product .sp-buy .btn-wishlist {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 49px;
  border-radius: 16px !important;
  width: 100%;
  font-weight: 800;
  background: transparent !important;
  border: 1px solid #d6d1e2 !important;
  margin-top: 0;
  color: var(--sp-ink) !important;
  box-shadow: none !important;
}

/* —— Benefits SVG strip —— */
body.lang-rtl#product .sp-benefits {
  margin-top: 28px;
  padding: 18px 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(100deg, #fbf4fb, #fff8fc);
  border-radius: var(--sp-radius);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--sp-shadow);
}

body.lang-rtl#product .sp-benefits > div {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  font-weight: 700;
  font-size: 14px;
  color: var(--sp-ink);
  padding: 4px 8px;
}

body.lang-rtl#product .sp-benefits > div + div {
  border-right: 1px solid #dedbea;
}

body.lang-rtl#product .sp-benefits .sp-svg {
  color: #ed0068;
  width: 24px;
  height: 24px;
}

/* Hide old reassurance / elhomeblocks when SVG strip is present */
body.lang-rtl#product .sp-benefits + .si-benefits-row,
body.lang-rtl#product .si-benefits-row {
  display: none !important;
}

@media (max-width: 600px) {
  body.lang-rtl#product .sp-benefits {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    font-size: 12px;
  }
  body.lang-rtl#product .sp-benefits > div + div {
    border: 0;
  }
  body.lang-rtl#product .sp-benefits > div {
    gap: 7px;
  }
}

/* —— Tabs —— */
body.lang-rtl#product #electron-product-info {
  margin-top: 25px !important;
}

body.lang-rtl#product #electron-product-info .tabs,
body.lang-rtl#product #electron-product-info .product-tabs,
body.lang-rtl#product #electron-product-info .nav-tabs {
  background: linear-gradient(145deg, #fff, #fbfaff);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  padding: 12px 20px 20px;
}

body.lang-rtl#product #electron-product-info .nav-tabs {
  border-bottom: 1px solid #e5e4ec !important;
  gap: 12px;
  display: flex;
  flex-wrap: wrap;
  padding-bottom: 10px !important;
  margin-bottom: 0;
}

body.lang-rtl#product #electron-product-info .nav-link {
  border: 0 !important;
  border-radius: 24px !important;
  background: #f8f3fa !important;
  padding: 8px 22px !important;
  font-weight: 700 !important;
  color: var(--sp-ink) !important;
  display: inline-flex !important;
  gap: 7px;
  align-items: center;
}

body.lang-rtl#product #electron-product-info .nav-link.active {
  background: #ed086b !important;
  color: #fff !important;
}

body.lang-rtl#product #electron-product-info .tab-content,
body.lang-rtl#product #electron-product-info .tab-pane {
  padding: 19px 16px 0;
}

/* —— Related —— */
body.lang-rtl#product .ss-related,
body.lang-rtl#product .product-accessories.ss-related {
  margin: 28px 0 35px !important;
}

body.lang-rtl#product .ss-related .accessories-title,
body.lang-rtl#product .ss-related .h2 {
  font-size: 21px !important;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px !important;
  font-weight: 900;
}

body.lang-rtl#product .ss-related-grid.np-grid,
body.lang-rtl#product .ss-related .np-grid {
  display: grid !important;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 36px) / 4);
  gap: 12px !important;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  padding: 2px 3px 14px;
}

body.lang-rtl#product .ss-related-grid.np-grid::-webkit-scrollbar {
  display: none;
}

body.lang-rtl#product .ss-related .np-card {
  scroll-snap-align: start;
  min-width: 0;
  border-radius: 23px !important;
}

@media (max-width: 900px) {
  body.lang-rtl#product .ss-related-grid.np-grid {
    grid-auto-columns: calc((100% - 24px) / 3);
  }
}

@media (max-width: 600px) {
  body.lang-rtl#product .ss-related-grid.np-grid {
    grid-auto-columns: calc((100% - 12px) / 2);
  }
}

/* —— Mobile sticky ATC (V2) —— */
/* Kill theme floating ATC — conflicts with V2 sticky bar */
body.lang-rtl#product .btn-add-to-cart.fl-addtc,
body.lang-rtl#product .add-to-cart.fl-addtc,
body.lang-rtl#product .fl-addtc {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  top: auto !important;
  width: 100% !important;
  z-index: auto !important;
  transform: none !important;
}

body.lang-rtl#product .ss-sticky-atc {
  display: none;
}

@media (max-width: 600px) {
  body.lang-rtl#product .ss-sticky-atc[data-ss-sticky-atc]:not([hidden]) {
    position: fixed !important;
    display: flex !important;
    align-items: center;
    gap: 15px;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 15px calc(10px + env(safe-area-inset-bottom));
    background: #fff !important;
    box-shadow: 0 -4px 15px rgba(23, 32, 71, 0.08) !important;
    z-index: 40 !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  body.lang-rtl#product .ss-sticky-atc__price {
    white-space: nowrap;
    color: #d50060 !important;
    font-weight: 900;
    font-size: 15px;
  }

  body.lang-rtl#product .ss-sticky-atc .btn {
    flex: 1;
    min-height: 46px;
    border-radius: 16px !important;
    background: linear-gradient(180deg, var(--sp-cta-top), var(--sp-pink-deep)) !important;
    border: 0 !important;
    font-weight: 800;
  }

  /* Ensure buy box sits in document flow under info */
  body.lang-rtl#product .sp-buy .product-actions {
    position: static !important;
  }
}
