/* BEGIN SOURCE /assets/sarmad-v76-product-details-ui-refinement.css sha256=c1b658c07b575e505c8bc2cdc87802477ea0e6a2fbe4a0fd69afc55af1e9c434 */

/*
 * SARMAD V76 - ProductDetails focused mobile visual refinement
 *
 * Scope:
 *   - ProductDetails typography / product option presentation
 *   - color swatches
 *   - size/custom-name fields
 *   - quantity controls
 *   - Add to cart / Buy now buttons
 *   - dedicated add-to-cart success toast
 *
 * Intentionally NOT changed:
 *   header, gallery/main image, thumbnails, custom-image upload behavior/card,
 *   footer/V75, product/cart/order/payment/currency/backend/database logic.
 */

@media (max-width: 767px) {
  .product-page {
    --sarmad-v76-blue: #6d97e2;
    --sarmad-v76-deep-blue: #18336e;
    --sarmad-v76-gold: #cdaa4a;
    --sarmad-v76-dark: #180b2c;
    font-family: "Thmanyah Sans", var(--sarmad-font), var(--arabic-font), Tahoma, Arial, sans-serif !important;
  }

  /* Typography: closer to the supplied 414px product-detail reference. */
  .product-page .product-options {
    text-align: right;
  }

  .product-page .product-options h1 {
    margin: 0 0 6px !important;
    color: currentColor;
    font-size: 26px !important;
    font-weight: 700 !important;
    line-height: 1.32 !important;
    letter-spacing: 0 !important;
  }

  .product-page .product-price {
    display: block;
    margin: 0 0 12px;
    color: var(--sarmad-v76-gold) !important;
    font-size: 21px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
  }

  .product-page .product-options > p {
    margin: 0 0 22px !important;
    padding: 0 0 18px !important;
    opacity: .9 !important;
    border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent) !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.85 !important;
  }

  .product-page .product-options fieldset {
    margin: 18px 0 20px !important;
  }

  .product-page .product-options legend,
  .product-page .product-field > span,
  .product-page .quantity-row > span {
    margin-bottom: 9px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
  }

  /* Colors: swatches only, no oversized color-name pills. Text remains in DOM for accessibility. */
  .product-page .color-options {
    direction: rtl !important;
    justify-content: flex-start !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 14px !important;
  }

  .product-page .color-options button {
    position: relative !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    gap: 0 !important;
    display: grid !important;
    place-items: center !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
  }

  .product-page .color-options button > span {
    width: 28px !important;
    height: 28px !important;
    display: block !important;
    border: 1px solid color-mix(in srgb, currentColor 28%, #777) !important;
    border-radius: 50% !important;
  }

  .product-page .color-options button.active {
    border: 0 !important;
    box-shadow: 0 0 0 2px var(--sarmad-v76-gold) !important;
  }

  .product-page .color-options button:focus-visible {
    outline: 2px solid var(--sarmad-v76-gold) !important;
    outline-offset: 3px !important;
  }

  /* Fields: same functionality, cleaner visual proportions. */
  .product-page .product-field {
    width: 100% !important;
    max-width: none !important;
    margin: 17px 0 !important;
  }

  .product-page .product-field input,
  .product-page .product-field select {
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 12px !important;
    color: var(--sarmad-v76-dark) !important;
    background: #e1ecff !important;
    border: 1px solid rgba(109, 151, 226, .28) !important;
    border-radius: 4px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    text-align: right !important;
    box-shadow: none !important;
  }

  :root[data-theme="light"] .product-page .product-field input,
  :root[data-theme="light"] .product-page .product-field select {
    background: #ffffff !important;
    border-color: rgba(24, 51, 110, .10) !important;
  }

  .product-page .product-field input::placeholder {
    color: #9a9a9a !important;
    opacity: .72 !important;
  }

  .product-page .product-field small {
    margin-top: 5px !important;
    opacity: .58 !important;
    font-size: 11px !important;
  }

  /* Quantity: compact three-part control, aligned to the right like the reference. */
  .product-page .quantity-row {
    margin: 20px 0 22px !important;
  }

  .product-page .quantity-row > div {
    direction: ltr !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .product-page .quantity-row button,
  .product-page .quantity-row output {
    box-sizing: border-box !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    place-items: center !important;
    border: 0 !important;
    border-radius: 6px !important;
    font-family: inherit !important;
    font-size: 18px !important;
    line-height: 1 !important;
    box-shadow: none !important;
  }

  .product-page .quantity-row button {
    color: var(--sarmad-v76-gold) !important;
    background: #ffffff !important;
  }

  :root[data-theme="light"] .product-page .quantity-row button {
    color: var(--sarmad-v76-gold) !important;
    background: #ece9e2 !important;
  }

  .product-page .quantity-row output {
    color: currentColor !important;
    background: transparent !important;
  }

  /* CTAs: compact, side-by-side and visually balanced. DOM order/logic is untouched. */
  .product-page .product-actions {
    width: 100% !important;
    margin: 24px 0 4px !important;
    display: flex !important;
    flex-direction: row !important;
    direction: ltr !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 16px !important;
  }

  .product-page .product-actions button {
    flex: 0 1 132px !important;
    width: 132px !important;
    min-width: 0 !important;
    min-height: 42px !important;
    height: 42px !important;
    padding: 0 10px !important;
    border-radius: 5px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease !important;
  }

  .product-page .product-actions button:not(.secondary) {
    color: #ffffff !important;
    background: var(--sarmad-v76-blue) !important;
    border: 1px solid var(--sarmad-v76-blue) !important;
    box-shadow: 0 8px 20px rgba(109, 151, 226, .16) !important;
  }

  .product-page .product-actions .secondary {
    color: var(--sarmad-v76-blue) !important;
    background: transparent !important;
    border: 1px solid var(--sarmad-v76-blue) !important;
    box-shadow: none !important;
  }

  .product-page .product-actions button:active {
    transform: translateY(1px) !important;
  }

  /* Existing optional upload block remains functionally and structurally unchanged. */
  .product-page .custom-upload {
    max-width: 100% !important;
  }
}

/* Dedicated product-details add-to-cart toast. It does not restyle the global app notices. */
.sarmad-v76-cart-toast {
  z-index: 100000;
  box-sizing: border-box;
  direction: rtl;
  width: min(360px, calc(100vw - 32px));
  min-height: 56px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #effff4;
  background: linear-gradient(135deg, rgba(18, 67, 43, .98), rgba(8, 44, 29, .98));
  border: 1px solid rgba(100, 218, 142, .46);
  border-radius: 14px;
  position: fixed;
  top: 96px;
  left: 50%;
  opacity: 0;
  transform: translate(-50%, -12px) scale(.985);
  pointer-events: none;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .30), 0 0 0 1px rgba(255,255,255,.03) inset;
  transition: opacity .20s ease, transform .20s ease;
}

.sarmad-v76-cart-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  pointer-events: auto;
}

.sarmad-v76-cart-toast__icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #43a963;
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(67, 169, 99, .30);
}

.sarmad-v76-cart-toast__text {
  overflow: hidden;
  color: inherit;
  font-family: "Thmanyah Sans", var(--sarmad-font), var(--arabic-font), Tahoma, Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  text-align: right;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sarmad-v76-cart-toast__close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #d9f5e3;
  background: rgba(255,255,255,.08);
  border: 0;
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

:root[data-theme="light"] .sarmad-v76-cart-toast {
  color: #18336e;
  background: rgba(255,255,255,.985);
  border-color: rgba(67,169,99,.36);
  box-shadow: 0 18px 40px rgba(24, 51, 110, .18), 0 0 0 1px rgba(24,51,110,.03) inset;
}

:root[data-theme="light"] .sarmad-v76-cart-toast__close {
  color: #18336e;
  background: #eef3fb;
}

@media (prefers-reduced-motion: reduce) {
  .sarmad-v76-cart-toast,
  .product-page .product-actions button {
    transition: none !important;
  }
}


/* END SOURCE /assets/sarmad-v76-product-details-ui-refinement.css */

/* BEGIN SOURCE /assets/sarmad-v78-product-details-recommendations.css sha256=d04079312d63e93a4a32441ac39a62b70b1a370fef43c97d7f507848b3b7c29f */

/*
 * SARMAD V78 - ProductDetails related products
 *
 * Design scope:
 *   - one recommendations section on ProductDetails only
 *   - desktop grid / mobile horizontal swipe
 *   - same Sarmad dark/light palette and Thmanyah Sans
 *
 * Logic is implemented by the companion V77 JS. No cart/payment/currency UI is
 * changed here. V75 footer and V76 ProductDetails refinement remain active.
 */

.product-page.sarmad-v78-related-active .product-page-grid {
  margin-bottom: 52px;
}

.product-page > .sarmad-v78-related {
  box-sizing: border-box;
  direction: rtl;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 104px;
  color: inherit;
  font-family: "Thmanyah Sans", var(--sarmad-font), var(--arabic-font), Tahoma, Arial, sans-serif;
}

.sarmad-v78-related__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 0 2px 17px;
  border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}

.sarmad-v78-related__title-wrap {
  min-width: 0;
}

.sarmad-v78-related__title {
  margin: 0;
  color: currentColor;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
}



.sarmad-v78-related__track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.sarmad-v78-card {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  background: color-mix(in srgb, #24133b 88%, transparent);
  border: 1px solid rgba(109, 151, 226, .18);
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .12);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

:root[data-theme="light"] .sarmad-v78-card {
  background: #ffffff;
  border-color: rgba(24, 51, 110, .10);
  box-shadow: 0 10px 26px rgba(24, 51, 110, .07);
}

.sarmad-v78-card:hover {
  transform: translateY(-3px);
  border-color: rgba(109, 151, 226, .44);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .17);
}

.sarmad-v78-card:focus-visible {
  outline: 3px solid #cdaa4a;
  outline-offset: 3px;
}

.sarmad-v78-card__image-wrap {
  aspect-ratio: 1.08 / 1;
  overflow: hidden;
  background: #d9d9d9;
}

.sarmad-v78-card__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .28s ease;
}

.sarmad-v78-card:hover .sarmad-v78-card__image {
  transform: scale(1.025);
}

.sarmad-v78-card__body {
  display: grid;
  align-content: start;
  min-height: 136px;
  padding: 13px 14px 14px;
}

.sarmad-v78-card__category {
  margin: 0 0 6px;
  color: #6d97e2;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

:root[data-theme="light"] .sarmad-v78-card__category {
  color: #18336e;
}

.sarmad-v78-card__name {
  min-width: 0;
  min-height: 46px;
  margin: 0;
  overflow: hidden;
  color: currentColor;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}

.sarmad-v78-card__action {
  justify-self: stretch;
  min-height: 37px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding: 0 11px;
  color: #ffffff;
  background: #6d97e2;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
}

:root[data-theme="light"] .sarmad-v78-card__action {
  background: #18336e;
}

.sarmad-v78-card__arrow {
  direction: ltr;
  font-family: Arial, sans-serif;
  font-size: 17px;
  line-height: 1;
}

.sarmad-v78-related__skeleton {
  min-height: 300px;
  overflow: hidden;
  background: color-mix(in srgb, currentColor 7%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 9%, transparent);
  border-radius: 16px;
  position: relative;
}

.sarmad-v78-related__skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 25%, rgba(255,255,255,.09) 45%, transparent 68%);
  transform: translateX(-100%);
  animation: sarmad-v78-shimmer 1.25s ease-in-out infinite;
}

@keyframes sarmad-v78-shimmer {
  to { transform: translateX(100%); }
}

@media (max-width: 767px) {
  .product-page.sarmad-v78-related-active .product-page-grid {
    margin-bottom: 34px !important;
  }

  .product-page > .sarmad-v78-related {
    width: calc(100% - 32px);
    margin-bottom: 72px;
  }

  .sarmad-v78-related__head {
    align-items: center;
    padding-bottom: 13px;
  }

  .sarmad-v78-related__title {
    font-size: 21px;
    line-height: 1.35;
  }



  .sarmad-v78-related__track {
    width: calc(100vw - 16px);
    margin-top: 17px;
    margin-left: -16px;
    padding: 0 0 8px 16px;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(109, 151, 226, .45) transparent;
  }

  .sarmad-v78-card {
    flex: 0 0 164px;
    width: 164px;
    scroll-snap-align: start;
    border-radius: 14px;
  }

  .sarmad-v78-card__image-wrap {
    aspect-ratio: 1 / .92;
  }

  .sarmad-v78-card__body {
    min-height: 132px;
    padding: 11px 11px 12px;
  }

  .sarmad-v78-card__category {
    margin-bottom: 5px;
    font-size: 11px;
  }

  .sarmad-v78-card__name {
    min-height: 42px;
    font-size: 14px;
    line-height: 1.48;
  }

  .sarmad-v78-card__action {
    min-height: 34px;
    margin-top: 9px;
    border-radius: 8px;
    font-size: 12px;
  }

  .sarmad-v78-related__skeleton {
    flex: 0 0 164px;
    width: 164px;
    min-height: 278px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sarmad-v78-card,
  .sarmad-v78-card__image,
  .sarmad-v78-related__skeleton::after {
    transition: none !important;
    animation: none !important;
  }
}


/* END SOURCE /assets/sarmad-v78-product-details-recommendations.css */
