/* Add custom CSS styles below */ 
/*
 * MOYTNA — Premium storefront / Salla Raed — 2026-09-11
 * مبني على عناصر moytna.com الفعلية وقت الفحص.
 * انسخ الملف كاملًا إلى نهاية خانة CSS المخصص، دون وسوم style.
 * احتفظ بنسخة من CSS القديم، وعاين الثيم قبل نشره.
 * للرجوع: احذف هذه الإضافة فقط.
 * صور البنرات ونصوصها، الشحن، الأسعار، وتشغيل السلايدر تُدار من سلة.
 */

/* 01 — هوية مويتنا: كحلي، بنفسجي هادئ، وخلفيات فاتحة */
body.theme-raed {
  --moytna-ink: #201747;
  --moytna-primary: #6247c9;
  --moytna-primary-dark: #4d35ab;
  --moytna-soft: #f0ecfb;
  --moytna-bg: #f8f7fc;
  --moytna-muted: #686476;
  --moytna-border: #e7e3f1;
  --moytna-radius: 20px;
  --moytna-shadow: 0 5px 20px rgb(32 23 71 / 5%);
  --color-primary: var(--moytna-primary);
  --color-primary-dark: var(--moytna-primary-dark);
  --color-primary-light: #a28be9;
  --color-primary-reverse: #fff;
  --s-radius: 12px;
  background-color: var(--moytna-bg);
  color: var(--moytna-ink);
  -webkit-font-smoothing: antialiased;
}

/* 02 — الهيدر والبحث، مع إبقاء نظام التثبيت الأصلي للقالب */
body.theme-raed .store-header .top-navbar {
  padding-block: 10px;
  background: var(--moytna-soft);
  border-bottom: 1px solid var(--moytna-border);
}
body.theme-raed #mainnav .inner {
  background: #fff;
  border-bottom: 1px solid var(--moytna-border);
  box-shadow: 0 5px 18px rgb(32 23 71 / 4%);
}
body.theme-raed .navbar-brand img {
  max-height: 58px;
  width: auto;
  object-fit: contain;
}
body.theme-raed .header-search .s-search-input {
  height: 46px !important;
  border: 1px solid var(--moytna-border);
  border-radius: 14px !important;
  background: #fff;
  color: var(--moytna-ink);
  font-size: 16px;
}
body.theme-raed .header-search .s-search-input::placeholder {
  color: var(--moytna-muted);
  opacity: 1;
}
body.theme-raed .main-menu > .root-level > a {
  color: var(--moytna-ink);
  font-weight: 600;
}
body.theme-raed .store-header .s-user-menu-login-btn {
  min-width: 44px;
  min-height: 44px;
  border-color: var(--moytna-border);
  color: var(--moytna-ink);
}
body.theme-raed .s-cart-summary-count {
  background: var(--moytna-primary);
  color: #fff;
}
body.theme-raed .s-advertisement {
  background-color: var(--moytna-ink) !important;
  color: #fff !important;
}

/* 03 — المسافات، البنرات، وعناوين الأقسام */
body.theme-raed.index main > .s-block {
  margin-top: clamp(30px, 4vw, 56px);
}
body.theme-raed.index main > .s-block:first-of-type {
  margin-top: 24px;
}
body.theme-raed .s-block--fixed-banner .banner--fixed {
  border-radius: var(--moytna-radius);
  box-shadow: var(--moytna-shadow);
}
body.theme-raed .s-block--fixed-banner .banner--fixed img {
  display: block;
  width: 100%;
  height: auto !important;
  object-fit: contain;
}
body.theme-raed :is(.s-block__title, .s-slider-block__title) {
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
body.theme-raed :is(.s-block__title, .s-slider-block__title) h2 {
  color: var(--moytna-ink);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 700;
  line-height: 1.6;
}
body.theme-raed :is(.s-block__display-all, .s-slider-block__title a) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding-inline: 14px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--moytna-soft);
  color: var(--moytna-primary-dark);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
body.theme-raed .s-slider-nav-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid var(--moytna-border);
  background: #fff;
  color: var(--moytna-primary);
}

/* 04 — بطاقات المنتجات؛ لا نغيّر عرض شرائح Swiper أو حركتها */
body.theme-raed main .s-product-card-entry {
  min-width: 0;
  border: 1px solid var(--moytna-border);
  border-radius: var(--moytna-radius);
  background: #fff;
  box-shadow: var(--moytna-shadow);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
body.theme-raed main .s-product-card-vertical > .s-product-card-image {
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  background: #fff;
  border-radius: var(--moytna-radius) var(--moytna-radius) 0 0;
}
body.theme-raed main .s-product-card-vertical > .s-product-card-image > a {
  display: block;
  width: 100%;
  height: 100%;
}
body.theme-raed main .s-product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  box-sizing: border-box;
}
body.theme-raed main .s-product-card-content {
  min-width: 0;
  flex: 1 1 auto;
  padding: 16px;
  gap: 12px;
}
body.theme-raed main .s-product-card-content-title {
  margin: 0;
}
body.theme-raed main .s-product-card-content-title a {
  display: block;
  min-height: 3.6em;
  height: auto;
  max-height: none;
  overflow: visible;
  -webkit-line-clamp: unset;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--moytna-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.8;
}
body.theme-raed main .s-product-card-content-subtitle {
  color: var(--moytna-muted);
  line-height: 1.7;
}
body.theme-raed main .s-product-card-content-sub {
  margin-top: auto;
}
body.theme-raed main .s-product-card-sale-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
body.theme-raed main :is(.s-product-card-price, .s-product-card-sale-price h4) {
  color: var(--moytna-ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}
body.theme-raed main .s-product-card-sale-price > span {
  color: var(--moytna-muted);
  font-size: 13px;
  text-decoration: line-through;
}
body.theme-raed main .s-product-card-content-footer {
  margin-top: 2px;
}
body.theme-raed main .s-product-card-wishlist-btn.s-button-element {
  width: 44px;
  height: 44px;
  border-color: var(--moytna-border);
  background: #fff;
}

/* 05 — زر السلة فقط؛ لا نعيد تلوين Apple Pay أو أزرار الدفع */
body.theme-raed main .s-product-card-content-footer salla-add-product-button .s-button-element {
  min-height: 46px;
  height: auto;
  padding: 10px 8px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}
body.theme-raed main .s-product-card-content-footer salla-add-product-button .s-button-text {
  white-space: normal;
  overflow: visible;
  line-height: 1.65;
}
body.theme-raed main .s-product-card-content-footer salla-add-product-button[product-status="sale"] .s-button-primary-outline,
body.theme-raed .product-form salla-add-product-button .s-button-primary {
  border-color: var(--moytna-primary);
  background: var(--moytna-primary);
  color: #fff;
}

/* 06 — أحدث المنتجات: شبكة بطاقات رأسية بدل البطاقات الأفقية */
body.theme-raed [data-testid="store-home-fixed-products-list"] .s-products-list-wrapper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
body.theme-raed [data-testid="store-home-fixed-products-list"] .s-product-card-horizontal {
  flex-direction: column;
  width: 100%;
  height: 100%;
  align-items: stretch;
}
body.theme-raed [data-testid="store-home-fixed-products-list"] .s-product-card-horizontal > .s-product-card-image {
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  background: #fff;
  border-radius: var(--moytna-radius) var(--moytna-radius) 0 0;
}
body.theme-raed [data-testid="store-home-fixed-products-list"] .s-product-card-image > a {
  display: block;
  width: 100%;
  height: 100%;
}
body.theme-raed [data-testid="store-home-fixed-products-list"] .s-product-card-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
}

/* 07 — الماركات: أحجام موحدة مع الحفاظ على ألوان الشعارات */
body.theme-raed .s-block--logos-slider {
  background: var(--moytna-soft);
  padding-block: 36px;
}
body.theme-raed .s-block--logos-slider > .container > .grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
body.theme-raed .s-block--logos-slider .brand-item {
  grid-row: auto;
  grid-column: auto;
  height: 116px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--moytna-border);
  border-radius: 16px;
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
body.theme-raed .s-block--logos-slider .brand-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 08 — صفحة المنتج والكمية */
body.theme-raed.product-single [data-testid="store-product-title"] {
  color: var(--moytna-ink);
  font-size: clamp(21px, 2.5vw, 30px);
  line-height: 1.7;
}
body.theme-raed.product-single .details-slider {
  border: 1px solid var(--moytna-border);
  border-radius: var(--moytna-radius);
  background: #fff;
}
body.theme-raed.product-single .product__description {
  color: var(--moytna-muted);
  line-height: 1.9;
}
body.theme-raed.product-single .product-form {
  border: 1px solid var(--moytna-border);
  border-radius: var(--moytna-radius);
  background: #fff;
}
body.theme-raed.product-single .product-form .total-price {
  color: var(--moytna-ink);
  font-size: 26px;
}
body.theme-raed .product-form .s-quantity-input-container {
  min-height: 46px;
  height: auto;
  border-color: var(--moytna-border);
  border-radius: 12px;
}
body.theme-raed .product-form .s-quantity-input-button {
  width: 44px;
  min-height: 44px;
  color: var(--moytna-primary);
}
body.theme-raed .product-form .s-quantity-input-input {
  min-width: 48px;
  width: 56px;
  font-size: 16px;
  color: var(--moytna-ink);
}
body.theme-raed .product-form salla-add-product-button .s-button-primary {
  min-height: 48px;
  border-radius: 12px;
  font-weight: 700;
}

/* 09 — المميزات والفوتر */
body.theme-raed .s-block--features__item {
  padding: 26px 20px;
  border: 1px solid var(--moytna-border);
  border-radius: var(--moytna-radius);
  background: #fff;
}
body.theme-raed .s-block--features__item .feature-icon {
  background: var(--moytna-soft);
  color: var(--moytna-primary);
}
body.theme-raed .s-block--features__item h2 {
  color: var(--moytna-ink);
  line-height: 1.7;
}
body.theme-raed .s-block--features__item p {
  color: var(--moytna-muted);
  line-height: 1.9;
}
body.theme-raed .store-footer,
body.theme-raed .store-footer__inner {
  background: #f0edf7;
  color: var(--moytna-ink);
}
body.theme-raed .store-footer {
  margin-top: 56px;
  border-top: 1px solid var(--moytna-border);
}
body.theme-raed .store-footer h3 {
  color: var(--moytna-ink);
  font-weight: 700;
}
body.theme-raed .store-footer p {
  line-height: 1.9;
}

/* 10 — تفاعل واضح بالماوس ولوحة المفاتيح */
body.theme-raed :is(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--moytna-primary-dark) !important;
  outline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) {
  body.theme-raed main .s-product-card-entry:hover,
  body.theme-raed .s-block--logos-slider .brand-item:hover {
    border-color: #b5a3e8;
    box-shadow: 0 8px 24px rgb(32 23 71 / 9%);
  }
  body.theme-raed .main-menu > .root-level > a:hover {
    color: var(--moytna-primary);
  }
  body.theme-raed main .s-product-card-content-footer salla-add-product-button[product-status="sale"] .s-button-primary-outline:not(:disabled):not([loading]):hover,
  body.theme-raed .product-form salla-add-product-button .s-button-primary:not(:disabled):not([loading]):hover {
    border-color: var(--moytna-primary-dark);
    background: var(--moytna-primary-dark);
    opacity: 1;
  }
}

/* 11 — التابلت والموبايل */
@media (min-width: 768px) and (max-width: 1023px) {
  body.theme-raed [data-testid="store-home-fixed-products-list"] .s-products-list-wrapper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  body.theme-raed {
    --moytna-radius: 16px;
  }
  body.theme-raed.index main > .s-block:first-of-type {
    margin-top: 16px;
  }
  body.theme-raed .navbar-brand img {
    max-height: 46px;
  }
  body.theme-raed :is(.s-block__title, .s-slider-block__title) {
    gap: 8px;
    margin-bottom: 16px;
  }
  body.theme-raed :is(.s-block__title, .s-slider-block__title) h2 {
    font-size: 18px;
  }
  body.theme-raed .s-slider-block__title {
    flex-wrap: wrap;
  }
  body.theme-raed main .s-product-card-content {
    padding: 12px;
    gap: 9px;
  }
  body.theme-raed main .s-product-card-content-title a {
    min-height: 5.4em;
    font-size: 13px;
  }
  body.theme-raed main .s-product-card-image img {
    padding: 8px;
  }
  body.theme-raed main :is(.s-product-card-price, .s-product-card-sale-price h4) {
    font-size: 18px;
  }
  body.theme-raed [data-testid="store-home-fixed-products-list"] .s-products-list-wrapper,
  body.theme-raed [data-testid="store-products-list"] .s-products-list-vertical-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  body.theme-raed .s-block--logos-slider {
    padding-block: 26px;
  }
  body.theme-raed .s-block--logos-slider > .container > .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  body.theme-raed .s-block--logos-slider .brand-item {
    height: 92px;
    padding: 12px;
    border-radius: 12px;
  }
  body.theme-raed .s-block--features > .grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  body.theme-raed .s-block--features__item {
    padding: 20px;
  }
  body.theme-raed .store-footer {
    margin-top: 36px;
  }
}
@media (max-width: 359px) {
  body.theme-raed [data-testid="store-home-fixed-products-list"] .s-products-list-wrapper,
  body.theme-raed [data-testid="store-products-list"] .s-products-list-vertical-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  body.theme-raed .s-block--logos-slider > .container > .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  body.theme-raed main .s-product-card-entry,
  body.theme-raed .s-block--logos-slider .brand-item {
    transition: none;
  }
}