@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600&family=IBM+Plex+Sans+Arabic:wght@400;500;600&display=swap');

/* ========================================
   FAYA — Variables
======================================== */

:root {
  --salla-black: #050505;
  --salla-white: #ffffff;
  --salla-oud: #7a2e3d;
  --salla-oud-hover: #5f2230;
  --salla-beige: #f4efea;
  --salla-text: #2b2728;
  --salla-muted: #756d70;

  --font-ar: "IBM Plex Sans Arabic", sans-serif;
  --font-en: "Cormorant Garamond", serif;
}

/* ========================================
   حركة الظهور للأقسام المخصصة فقط
======================================== */

.reveal-up {
  opacity: 1;
  transform: none;
}

html.faya-reveal-ready .reveal-up {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

html.faya-reveal-ready .reveal-up.active {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  html.faya-reveal-ready .reveal-up,
  html.faya-reveal-ready .reveal-up.active {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
  }
}

/* ========================================
   الأقسام المخصصة
======================================== */

.custom-section {
  font-family: var(--font-ar);
  color: var(--salla-text);
  overflow: hidden;
}

.custom-title {
  margin: 0 0 10px;
  font-size: 2.2rem;
  font-weight: 500;
}

.custom-subtitle {
  color: var(--salla-oud);
  font-family: var(--font-en);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ========================================
   الهيرو القديم المخصص
   لا يؤثر على الهيرو الجديد إذا كان بكلاس مختلف
======================================== */

.faya-hero-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 75vh;
  min-height: 500px;

  overflow: hidden;

  background-color: var(--salla-black);
  background-image:
    linear-gradient(
      rgba(0, 0, 0, 0.4),
      rgba(0, 0, 0, 0.6)
    ),
    url('https://cdn.salla.sa/Ygmdzl/EzJ32oj5qJgyFxZpRksD93hYmqF60MCluXSptyFv.jpg');
  background-position: center;
  background-size: cover;

  color: var(--salla-white);
  text-align: center;
}

.faya-hero-banner h1 {
  margin: 0 0 20px;

  color: var(--salla-white);

  font-family: var(--font-ar);
  font-size: clamp(2.5rem, 5vw, 4rem);
}

.faya-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 14px 36px;

  border: 1px solid var(--salla-oud);
  border-radius: 2px;

  background-color: var(--salla-oud);
  color: var(--salla-white) !important;

  font-weight: 500;
  text-decoration: none;

  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}

.faya-hero-btn:hover {
  border-color: var(--salla-white);
  background-color: var(--salla-white);
  color: var(--salla-black) !important;
}

/* ========================================
   شريط الثقة
======================================== */

.faya-trust-bar {
  padding: 30px 5%;
  background-color: var(--salla-beige);
}

.faya-trust-bar__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;

  width: 100%;
  max-width: 1200px;
  margin: 0 auto;

  text-align: center;
}

.faya-trust-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;

  min-width: 0;
}

.faya-trust-bar__item svg {
  width: 32px;
  height: 32px;

  flex-shrink: 0;
  color: var(--salla-oud);
}

.faya-trust-bar__item span {
  font-size: 1rem;
  font-weight: 500;
}

/* ========================================
   التصنيفات المخصصة في الرئيسية فقط
======================================== */

.faya-cats {
  padding: 60px 5%;

  background-color: var(--salla-white);
  text-align: center;
}

.faya-cats__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;

  width: 100%;
  max-width: 1200px;
  margin: 40px auto 0;
}

.faya-cat-card {
  position: relative;
  display: block;

  aspect-ratio: 3 / 4;

  overflow: hidden;

  border-radius: 4px;
  background-color: var(--salla-beige);
}

.faya-cat-card img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  transition: transform 0.6s ease;
}

.faya-cat-card:hover img {
  transform: scale(1.05);
}

.faya-cat-card__title {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;

  padding: 10px 16px;

  border-radius: 2px;

  background-color: rgba(255, 255, 255, 0.94);
  color: var(--salla-black);

  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

/* ========================================
   الختام المخصص
======================================== */

.faya-luxury-footer {
  padding: 100px 5%;

  background-color: var(--salla-black);
  color: var(--salla-white);

  text-align: center;
}

.faya-luxury-footer h2 {
  margin: 0 0 20px;

  color: var(--salla-white);
  font-size: 2.5rem;
}

.faya-luxury-footer p {
  max-width: 600px;
  margin: 0 auto 30px;

  color: #cccccc;
  line-height: 1.8;
}

/* ========================================
   ألوان بطاقات المنتجات فقط
   لا تغيّر تخطيط التصنيفات
======================================== */

.s-product-card-entry .s-product-card-content-title,
.s-product-card-entry .s-product-card-content-title a {
  color: var(--salla-text) !important;
}

.s-product-card-entry .s-product-card-content-sub {
  color: var(--salla-muted) !important;
}

.s-product-card-entry .s-product-card-price {
  color: var(--salla-oud) !important;
}

/* ========================================
   زر إضافة للسلة داخل بطاقة المنتج فقط
======================================== */

.s-product-card-entry
salla-add-product-button
.s-button-element {
  border-color: var(--salla-oud) !important;
  background-color: var(--salla-oud) !important;
  color: var(--salla-white) !important;
  box-shadow: none !important;
}

.s-product-card-entry
salla-add-product-button
.s-button-element span,

.s-product-card-entry
salla-add-product-button
.s-button-element i {
  color: var(--salla-white) !important;
}

.s-product-card-entry
salla-add-product-button
.s-button-element svg {
  color: var(--salla-white) !important;
  fill: currentColor !important;
}

.s-product-card-entry
salla-add-product-button
.s-button-element:hover {
  border-color: var(--salla-oud-hover) !important;
  background-color: var(--salla-oud-hover) !important;
  color: var(--salla-white) !important;
}

/* الزر المعطل داخل البطاقة فقط */

.s-product-card-entry
salla-add-product-button
.s-button-element:disabled,

.s-product-card-entry
salla-add-product-button
.s-button-element.is-disabled {
  border-color: #d8d2d3 !important;
  background-color: #ece8e9 !important;
  color: #91898c !important;
  opacity: 1 !important;
}

/* ========================================
   زر إضافة للسلة في صفحة المنتج فقط
======================================== */

.product-form
salla-add-product-button
.s-button-element {
  border-color: var(--salla-oud) !important;
  background-color: var(--salla-oud) !important;
  color: var(--salla-white) !important;
  box-shadow: none !important;
}

.product-form
salla-add-product-button
.s-button-element:hover {
  border-color: var(--salla-oud-hover) !important;
  background-color: var(--salla-oud-hover) !important;
  color: var(--salla-white) !important;
}

/* ========================================
   إخفاء شريط البحث على الجوال فقط
   بدون تعديل حاويات الهيدر
======================================== */

@media (max-width: 767px) {
  .store-header salla-search,
  .store-header .header-search {
    display: none !important;
  }
}

/* ========================================
   الجوال — الأقسام المخصصة فقط
======================================== */

@media (max-width: 768px) {
  .custom-title {
    font-size: 1.7rem;
  }

  .faya-hero-banner {
    height: auto;
    min-height: 520px;
    padding: 80px 20px;
    background-position: center;
  }

  .faya-hero-banner h1 {
    font-size: 2.2rem;
  }

  .faya-trust-bar {
    padding: 24px 20px;
  }

  .faya-trust-bar__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .faya-trust-bar__item {
    gap: 7px;
  }

  .faya-trust-bar__item svg {
    width: 25px;
    height: 25px;
  }

  .faya-trust-bar__item span {
    font-size: 0.78rem;
    line-height: 1.5;
  }

  .faya-cats {
    padding: 45px 16px;
  }

  .faya-cats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;

    margin-top: 28px;
  }

  .faya-cat-card__title {
    right: 9px;
    bottom: 9px;
    left: 9px;

    padding: 8px 6px;

    font-size: 0.85rem;
    white-space: normal;
  }

  .faya-luxury-footer {
    padding: 70px 20px;
  }

  .faya-luxury-footer h2 {
    font-size: 2rem;
  }
}

/* ========================================
   FAYA — Footer Colors
======================================== */

:root {
  --faya-footer-bg: #2f2529;
  --faya-footer-text: #f4efea;
  --faya-footer-muted: #c9bec1;
  --faya-footer-accent: #b99aa4;
  --faya-footer-border: rgba(255, 255, 255, 0.12);
}

/* خلفية الفوتر */
.store-footer,
footer.store-footer,
footer {
  background-color: var(--faya-footer-bg) !important;
  color: var(--faya-footer-text) !important;
}

/* عناوين الفوتر */
.store-footer h2,
.store-footer h3,
.store-footer h4,
.store-footer .footer-title,
footer h2,
footer h3,
footer h4 {
  color: var(--faya-footer-text) !important;
}

/* النصوص */
.store-footer p,
.store-footer span,
.store-footer li,
footer p,
footer li {
  color: var(--faya-footer-muted) !important;
}

/* الروابط */
.store-footer a,
footer a {
  color: var(--faya-footer-muted) !important;
  transition: color 0.25s ease;
}

.store-footer a:hover,
footer a:hover {
  color: var(--faya-footer-text) !important;
}

/* الأيقونات */
.store-footer i,
.store-footer svg,
footer i,
footer svg {
  color: var(--faya-footer-accent) !important;
}

/* الخطوط الفاصلة */
.store-footer hr,
.store-footer .border-t,
footer hr {
  border-color: var(--faya-footer-border) !important;
}

/* ========================================
   FAYA — Footer Mobile Fix
======================================== */

:root {
  --faya-footer-bg: #1b1d1d;
  --faya-footer-text: #f4efea;
  --faya-footer-muted: #c9c0c2;
  --faya-footer-accent: #b998a3;
  --faya-footer-border: rgba(255, 255, 255, 0.1);
}

/* خلفية الفوتر */
.store-footer,
footer.store-footer {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  background-color: var(--faya-footer-bg) !important;
  color: var(--faya-footer-text) !important;
}

/* إلغاء الإطار الأخضر أو لون الثيم */
.store-footer::before,
.store-footer::after,
footer.store-footer::before,
footer.store-footer::after {
  display: none !important;
  border: 0 !important;
  background: none !important;
}

/* الحاوية الداخلية */
.store-footer .container,
footer.store-footer .container {
  width: 100% !important;
  max-width: 1280px !important;
  margin: 0 auto !important;
  padding: 55px 24px 34px !important;
  border: 0 !important;
}

/* منع خروج الأعمدة من الشاشة */
.store-footer .grid,
.store-footer .footer-list,
.store-footer .footer-items,
.store-footer .footer-container {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

/* العناوين */
.store-footer h2,
.store-footer h3,
.store-footer h4,
.store-footer .footer-title {
  margin-top: 0 !important;
  margin-bottom: 18px !important;
  color: var(--faya-footer-text) !important;
  font-family: var(--font-ar) !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
}

/* النصوص والروابط */
.store-footer p,
.store-footer li,
.store-footer span,
.store-footer a {
  max-width: 100% !important;
  color: var(--faya-footer-muted) !important;
  font-family: var(--font-ar) !important;
  line-height: 1.9 !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

.store-footer a:hover {
  color: var(--faya-footer-text) !important;
}

/* الأيقونات */
.store-footer i,
.store-footer svg {
  color: var(--faya-footer-accent) !important;
}

/* الخطوط الفاصلة */
.store-footer hr,
.store-footer .border-t,
.store-footer .border-b {
  border-color: var(--faya-footer-border) !important;
}

/* ========================================
   الجوال
======================================== */

@media (max-width: 767px) {
  .store-footer .container,
  footer.store-footer .container {
    padding: 38px 20px 28px !important;
  }

  /* تحويل الأعمدة إلى عمود واحد */
  .store-footer .grid,
  .store-footer .footer-container,
  .store-footer .footer-items {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 34px !important;
  }

  /* كل قسم يأخذ عرض الشاشة */
  .store-footer .grid > *,
  .store-footer .footer-container > *,
  .store-footer .footer-items > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  /* ضبط المحاذاة العربية */
  .store-footer,
  .store-footer .container,
  .store-footer p,
  .store-footer li,
  .store-footer h2,
  .store-footer h3,
  .store-footer h4 {
    direction: rtl !important;
    text-align: right !important;
  }

  /* وصف المتجر */
  .store-footer p {
    font-size: 15px !important;
    line-height: 2 !important;
  }

  /* العناوين */
  .store-footer h2,
  .store-footer h3,
  .store-footer h4,
  .store-footer .footer-title {
    font-size: 21px !important;
  }

  /* روابط الفوتر */
  .store-footer ul {
    margin: 0 !important;
    padding: 0 !important;
  }

  .store-footer li {
    margin-bottom: 12px !important;
  }

  /* معلومات التواصل */
  .store-footer a[href^="tel:"],
  .store-footer a[href^="mailto:"],
  .store-footer a[href*="wa.me"],
  .store-footer a[href*="whatsapp"] {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
    direction: ltr !important;
    text-align: left !important;
  }

  /* السجل والرقم الضريبي */
  .store-footer .tax-number,
  .store-footer .commercial-registration,
  .store-footer [class*="tax"],
  .store-footer [class*="commercial"] {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* =====================================================
   FAYA — Safe Homepage Progressive Reveal
   يعمل على الصفحة الرئيسية وأقسام FAYA المحددة فقط
===================================================== */

/*
 * الحالة الافتراضية:
 * جميع الأقسام ظاهرة، حتى لو لم يعمل JavaScript.
 */
.faya-home-reveal {
  opacity: 1;
  transform: none;
}

/*
 * إخفاء القسم لا يبدأ إلا بعد تأكيد جاهزية JavaScript.
 * هذا يمنع اختفاء المحتوى عند بطء أو تعطل السكربت.
 */
html.faya-home-reveal-ready .faya-home-reveal {
  opacity: 0;
  transform: translate3d(0, 20px, 0);

  transition:
    opacity 0.68s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.68s cubic-bezier(0.22, 1, 0.36, 1);

  transition-delay: var(--faya-home-delay, 0ms);

  will-change: opacity, transform;
}

/* عند دخول القسم إلى الشاشة */
html.faya-home-reveal-ready
.faya-home-reveal.faya-home-reveal-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* إيقاف تحسين الحركة بعد اكتمالها */
html.faya-home-reveal-ready
.faya-home-reveal.faya-home-reveal-complete {
  will-change: auto;
}

/* حركة أخف على الجوال */
@media (max-width: 768px) {
  html.faya-home-reveal-ready .faya-home-reveal {
    transform: translate3d(0, 13px, 0);

    transition-duration: 0.56s;
  }
}

/* إلغاء الحركة عند تفعيل تقليل الحركة في الجهاز */
@media (prefers-reduced-motion: reduce) {
  html.faya-home-reveal-ready .faya-home-reveal,
  html.faya-home-reveal-ready
  .faya-home-reveal.faya-home-reveal-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    transition-delay: 0ms !important;
    will-change: auto !important;
  }
}