/* الصوان الذهبي — قالب سيليا
   نسخة مرتبة: استبدل بها كامل CSS السابق
   01 — ألوان الهوية والمتغيرات العامة */
:root {
  --gf-green: #243129;
  --gf-dark: #18241e;
  --gf-gold: #c5a059;
  --gf-light: #e4c989;
  --gf-beige: #eee3d2;
  --gf-cream: #fff9f0;
  --gf-radius: 22px;
  --gf-border: 1px solid #c5a05970;
  --gf-shadow: 0 3px 8px #24312914;
  --gf-line: linear-gradient(90deg,transparent,#c5a059,#e4c989,#c5a059,transparent);
}

body {
  color: var(--gf-green);
  background: #fbfaf7;
}

:is(.section-title,.s-block__title,.s-block__title h2,.s-block__title h3) {
  color: var(--gf-green);
  font-weight: 800;
}

.s-block__title::after {
  content: "";
  display: block;
  width: 70px;
  height: 2px;
  margin-top: 7px;
  background: var(--gf-line);
}

/* 02 — بطاقات المنتجات والعناوين والأسعار */
.product-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  background: #fff;
  border: var(--gf-border);
  border-radius: var(--gf-radius);
  box-shadow: var(--gf-shadow);
  transition: transform .2s,box-shadow .2s;
}

.product-card--vertical {
  display: flex;
  flex-direction: column;
  height: 100%!important;
  min-height: 0!important;
  align-self: stretch!important;
}

body .product-card--vertical > .content-wrap {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto!important;
  min-width: 0;
  min-height: 0!important;
}

body .product-card--vertical .product-card__content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto!important;
  justify-content: flex-start!important;
  min-width: 0;
  min-height: 0!important;
  padding: var(--gf-card-padding,8px 12px 12px)!important;
}

body .product-card .product-card__content-wrapper {
  padding: 0!important;
  min-height: 0!important;
}

body .product-card salla-product-options {
  display: block;
  max-width: 100%;
  margin-bottom: 4px!important;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0 18px auto;
  height: 2px;
  background: var(--gf-line);
  z-index: 2;
  pointer-events: none;
}

.product-card .product-card__image {
  position: relative;
  overflow: hidden;
  background: #fff;
}

.product-card--vertical .product-card__image {
  aspect-ratio: 1;
  height: auto;
  flex: 0 0 auto!important;
}

.product-card--vertical .product-card__image > a {
  display: block;
  width: 100%;
  height: 100%;
}

.product-card .product-card__image img {
  box-sizing: border-box;
  object-fit: contain;
  padding: 8px;
  background: #fff;
}

.product-card--vertical .product-card__image > a > img {
  width: 100%;
  height: 100%;
}

.product-card .product-card__title {
  height: auto!important;
  min-height: 3em!important;
  max-height: none;
  margin: 4px 0!important;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  color: var(--gf-green);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5!important;
}

.product-card .product-card__title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  text-decoration: none;
}

.product-card .product-card__subtitle {
  color: #80643f!important;
  opacity: 1;
  line-height: 1.5!important;
  margin: 0 0 6px!important;
}

.product-card .product-card__price {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 6px 0!important;
  color: var(--gf-green);
  font-weight: 800;
  flex-wrap: wrap;
  gap: 6px!important;
}

.product-card .total-price {
  color: var(--gf-green);
}

:is(.sale-price,.price--sale,.s-product-card-sale-price) {
  color: #27643f;
  font-weight: 800;
}

:is(.old-price,.price--old,.before-price,.s-product-card-regular-price) {
  color: #6f746f;
  text-decoration: line-through;
}

body .product-card .product-card__content > :is(.product-card__buttons,.product-card__normal-cart,.product-card__enhanced-mini-cart),body .product-card .product-card__footer {
  margin-top: auto!important;
  padding-top: 6px!important;
}

/* 03 — القلب والعرض السريع أعلى يمين الصورة */
body .product-card .product-card__image > .product-card__buttons.normal {
  position: absolute!important;
  inset: 10px 10px auto auto!important;
  display: flex!important;
  flex-direction: row!important;
  gap: 6px!important;
  width: max-content!important;
  height: auto!important;
  margin: 0!important;
  padding: 0!important;
  transform: none!important;
  opacity: 1!important;
  visibility: visible!important;
  z-index: 10;
}

body .product-card .product-card__buttons.normal :is(.wishlist,.quickview-btn,salla-button,button) {
  position: relative!important;
  inset: auto!important;
  transform: none!important;
  margin: 0!important;
  opacity: 1!important;
  visibility: visible!important;
}

body .product-card .product-card__buttons.normal :is(.wishlist,.quickview-btn,salla-button) {
  display: flex!important;
  width: 40px!important;
  height: 40px!important;
  padding: 0!important;
  border: 0!important;
  background: transparent!important;
  box-shadow: none!important;
}

body .product-card .product-card__buttons.normal button {
  display: flex!important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 40px!important;
  height: 40px!important;
  min-height: 0!important;
  padding: 0!important;
  border: 1px solid var(--gf-gold)!important;
  border-radius: 50%!important;
  background: #fff!important;
  color: var(--gf-green)!important;
  box-shadow: var(--gf-shadow)!important;
}

body .product-card .product-card__buttons.normal :is(.wishlist,.quickview-btn)::before, body .product-card .product-card__buttons.normal :is(.wishlist,.quickview-btn)::after {
  content: none!important;
}

body .product-card .product-card__image:has(> .product-card__buttons.normal) > .product-card__actions, body .product-card:has(.product-card__image > .product-card__buttons.normal) .product-card__content .product-card__buttons > :is(.wishlist,.quickview-btn) {
  display: none!important;
}

body .product-card .product-card__buttons.normal button:is([aria-pressed="true"],.favorited,.added) {
  background: var(--gf-green)!important;
  color: var(--gf-light)!important;
}

/* 04 — عنوان الترويج أعلى اليسار */
body .product-card .product-card__image > .product-card__promotion {
  position: absolute!important;
  inset: 10px auto auto 10px!important;
  display: block!important;
  box-sizing: border-box;
  width: max-content;
  height: auto;
  max-width: calc(100% - 116px);
  padding: 6px 8px;
  margin: 0;
  background: var(--gf-green)!important;
  color: #fff;
  border: 1px solid var(--gf-gold);
  border-radius: 10px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
  transform: none!important;
  opacity: 1!important;
  visibility: visible!important;
  z-index: 6;
}

/* 05 — خلفيات خيارات الألوان والمقاسات وصور الخيارات */
.product-card .s-product-options-option:is([data-option-type="thumbnail"],[data-option-type="color"],[data-option-type="single-option"]) {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: fit-content!important;
  max-width: 100%!important;
  min-width: 0;
  height: auto!important;
  min-height: 0;
  padding: 0!important;
  margin: 4px auto!important;
  background: linear-gradient(#fffdf9,var(--gf-beige));
  border: var(--gf-border);
  border-radius: 12px;
  box-shadow: 0 3px 0 #a98d6740;
}

.product-card :is(.s-product-options-colors-wrapper,.s-product-options-grid-mode) {
  display: flex;
  flex-wrap: nowrap!important;
  justify-content: safe center!important;
  align-items: center;
  box-sizing: border-box;
  gap: 6px;
  min-width: 0;
  width: max-content!important;
  max-width: 100%!important;
  height: auto;
  min-height: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  margin: 0!important;
  padding: 4px 6px!important;
  border: 0;
}

.product-card .s-product-options-grid-mode-span {
  background: var(--gf-cream)!important;
  color: var(--gf-green)!important;
  border: 1px solid var(--gf-gold)!important;
  border-radius: 8px;
  line-height: 1.5;
}

.product-card .s-product-options-grid-mode input:checked + .s-product-options-grid-mode-span {
  background: var(--gf-green)!important;
  color: #fff!important;
}

.product-card .s-product-options-colors-item input:checked + label > span {
  outline: 2px solid var(--gf-gold);
  outline-offset: 2px;
}

.product-card :is(.s-product-options-colors-item,.s-product-options-grid-mode) input:focus-visible + :is(label,.s-product-options-grid-mode-span) {
  outline: 2px solid var(--gf-green);
  outline-offset: 2px;
}

.product-card .s-product-options-option:is([data-option-type="thumbnail"],[data-option-type="color"],[data-option-type="single-option"]) .s-product-options-option-content {
  width: auto!important;
  max-width: 100%;
  min-width: 0;
  height: auto;
  min-height: 0;
  margin: 0!important;
}

.product-card .s-product-options-thumbnails-wrapper {
  display: flex;
  flex-wrap: nowrap!important;
  align-items: center;
  justify-content: safe center!important;
  box-sizing: border-box;
  width: max-content!important;
  max-width: 100%!important;
  gap: 6px;
  height: auto!important;
  min-height: 0;
  padding: 4px 6px!important;
  margin: 0!important;
  overflow-x: auto;
  scrollbar-width: thin;
}

.product-card :is(.s-product-options-thumbnails-wrapper,.s-product-options-colors-wrapper) > div, .product-card .s-product-options-grid-mode > label {
  flex: 0 0 auto!important;
  height: auto!important;
  min-height: 0;
}

.product-card .s-product-options-thumbnails-wrapper label {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 44px!important;
  height: 44px!important;
  min-height: 0;
  padding: 2px;
  margin: 0;
  border-radius: 6px;
}

.product-card .s-product-options-thumbnails-wrapper label img {
  display: block;
  width: 100%!important;
  height: 100%!important;
  object-fit: contain;
  padding: 0;
}

.product-card .s-product-options-thumbnails-icon {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%,-50%);
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  line-height: 1;
}

.product-card .s-product-options-thumbnails-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.product-card .s-product-options-thumbnails-wrapper input:checked + label {
  outline: 2px solid var(--gf-gold);
  outline-offset: -2px;
}

.product-card .s-product-options-thumbnails-wrapper input:focus-visible + label {
  outline: 2px solid var(--gf-green);
  outline-offset: 1px;
}

/* 06 — أزرار السلة والشراء وإتمام الطلب */
body .product-card .product-card__enhanced-mini-cart .s-button-element, :is(salla-add-product-button .s-button-element,.add-to-cart,.btn-add-to-cart,.buy-now,.btn-buy-now,.product-buy-now,.cart-submit,.checkout-button,.btn-checkout) {
  --gf-base: var(--gf-dark);
  min-height: 44px;
  background: linear-gradient(#31483b,var(--gf-green) 55%,#1c2922)!important;
  color: #fff!important;
  border: 1px solid var(--gf-gold)!important;
  border-radius: 13px!important;
  box-shadow: 0 4px 0 var(--gf-base),0 7px 12px #24312929!important;
  font-weight: 800;
  transition: transform .15s,box-shadow .15s;
}

:is(.buy-now,.btn-buy-now,.product-buy-now) {
  --gf-base: #8f6c35;
  min-height: 52px;
  background: linear-gradient(#e4c989,#c5a059,#ad8645)!important;
  color: var(--gf-dark)!important;
}

:is(.product-single,.product-page,.product-entry--page) salla-add-product-button .s-button-element {
  min-height: 54px;
  font-size: 1rem;
}

body .product-card .product-card__enhanced-mini-cart .enhanced-label {
  color: #fff!important;
}

body .product-card .product-card__enhanced-mini-cart .enhanced-icon {
  color: var(--gf-light)!important;
}

/* 07 — صفحة تفاصيل المنتج والنماذج والتقييمات */
:is(.product-single__info,.product-info,.product-entry--page .product-entry__content) {
  position: relative;
  padding: clamp(16px,2vw,28px);
  background: linear-gradient(145deg,#fff,#f7f1e7);
  border: var(--gf-border);
  border-radius: var(--gf-radius);
  box-shadow: var(--gf-shadow);
}

:is(.product-single__info,.product-info) h1,.product-title {
  color: var(--gf-green);
  font-weight: 800;
  line-height: 1.55;
}

:is(.product-single__price,.product-info .price,.product-price) {
  color: var(--gf-green);
  font-weight: 900;
  font-size: clamp(1.25rem,2vw,1.75rem);
}

:is(.product-single__media,.product-gallery,salla-slider.photos-slider,.product-description,.product-details,.description-wrapper,.product-tabs,.s-comments-product,.product-reviews,.reviews-wrapper) {
  background: #fff;
  border: var(--gf-border);
  border-radius: var(--gf-radius);
  box-shadow: var(--gf-shadow);
}

:is(.product-description,.product-details) {
  color: #4a514c;
  line-height: 1.9;
}

:is(.product-description,.product-details) :is(h2,h3) {
  color: var(--gf-green);
  font-weight: 800;
}

:is(.s-tabs-header,.tabs__header,.product-tabs__header) {
  border-bottom: var(--gf-border);
}

:is(.s-tabs-header,.tabs__header,.product-tabs__header) button {
  color: #6f746f;
  font-weight: 700;
}

:is(.s-tabs-header,.tabs__header,.product-tabs__header) button:is(.active,[aria-selected="true"]) {
  color: var(--gf-green);
  border-color: var(--gf-gold);
}

:is(.sicon-star,.rating-star,.star-rating) {
  color: var(--gf-gold);
}

:is(salla-product-options,.product-options,.product-option) label {
  color: var(--gf-green);
  font-weight: 700;
}

:is(salla-product-options,.product-options,.product-option) :is(select,textarea,input:not([type]),input[type="text"],input[type="number"],input[type="email"],input[type="tel"],input[type="date"]) {
  box-sizing: border-box;
  min-height: 46px;
  max-width: 100%;
  background: linear-gradient(#fffdf9,var(--gf-beige));
  color: var(--gf-green);
  border: var(--gf-border);
  border-radius: 12px;
  box-shadow: 0 3px 0 #a98d6740;
}

:is(salla-product-options,.product-options,.product-option) :is(input[type="radio"],input[type="checkbox"]) {
  accent-color: var(--gf-green);
}

:is(.product-options,.product-option) .form-check {
  background: var(--gf-cream);
  border: var(--gf-border);
  border-radius: 12px;
}

:is(salla-quantity-input,.s-quantity-input-container,.quantity-input) {
  background: var(--gf-cream);
  border: var(--gf-border);
  border-radius: 13px;
  overflow: hidden;
}

:is(salla-quantity-input,.s-quantity-input-container,.quantity-input) button {
  background: linear-gradient(#fff,var(--gf-beige));
  color: var(--gf-green);
}

:is(input[type="text"],input[type="email"],input[type="tel"],input[type="number"],textarea) {
  border-color: #c5a05973;
  border-radius: 11px;
}

:is(.product-card,.product-single,.product-page,.product-entry--page) :is(a,button,input,select,textarea):focus-visible {
  outline: 2px solid var(--gf-green);
  outline-offset: -2px;
}

/* 08 — تأثيرات المرور والضغط وحالات الأزرار */
@media (hover:hover) and (pointer:fine) {
  .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px #2431291f;
  }

  .product-card .product-card__title a:hover {
    color: #97743c;
  }

  body .product-card .product-card__buttons.normal button:hover {
    background: var(--gf-green)!important;
    color: #fff!important;
  }

  :is(salla-add-product-button .s-button-element,.add-to-cart,.btn-add-to-cart,.buy-now,.btn-buy-now,.product-buy-now):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--gf-base),0 10px 15px #24312929!important;
  }

  :is(.header-btn,.navbar-menu button,.main-nav button):hover {
    color: #97743c;
  }

}

:is(salla-add-product-button .s-button-element,.add-to-cart,.btn-add-to-cart,.buy-now,.btn-buy-now,.product-buy-now):active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--gf-base)!important;
}

:is(salla-add-product-button .s-button-element,.add-to-cart,.btn-add-to-cart,.buy-now,.btn-buy-now,.product-buy-now):is(:disabled,[disabled],[aria-disabled="true"],[aria-busy="true"],salla-add-product-button[disabled] *,salla-add-product-button[loading] *) {
  transform: none!important;
  box-shadow: none!important;
  opacity: .6;
}

/* 09 — تنسيق الأجهزة اللوحية والجوال */
@media (max-width:768px) {
  :root {
    --gf-radius: 15px;
    --gf-card-padding: 6px 8px 10px;
  }

  .product-card .product-card__image img {
    padding: 5px;
  }

  :is(.product-single,.product-page,.product-entry--page) salla-add-product-button .s-button-element {
    min-height: 50px;
  }

}

@media (max-width:480px) {
  .product-card .product-card__title {
    font-size: .88rem;
  }

  .product-card .product-card__price {
    font-size: .94rem;
  }

  body .product-card .product-card__image > .product-card__promotion {
    font-size: 11px;
    line-height: 1.4;
    padding: 5px;
  }

  :is(.product-single__info,.product-info) h1 {
    font-size: 1.35rem;
  }

}

/* 10 — احترام إعداد تقليل الحركة */
@media (prefers-reduced-motion:reduce) {
  .product-card,:is(salla-add-product-button .s-button-element,.add-to-cart,.btn-add-to-cart,.buy-now,.btn-buy-now,.product-buy-now) {
    transition: none!important;
    transform: none!important;
  }

}