/* ============================================================
   Prestige Wigs — Custom CSS
   ============================================================ */


/* ============================================================
   [1] الناف بار الشفاف — الصفحة الرئيسية فقط
   ============================================================ */

body.index .store-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: transparent !important;
}

body.index .store-header .top-navbar {
  background: transparent !important;
  background-image: none !important;
}

body.index .store-header #mainnav {
  background: transparent !important;
  box-shadow: none !important;
}

body.index .store-header #mainnav:not(.fixed-pinned) .inner {
  background: transparent !important;
  box-shadow: none !important;
}

body.index .store-header .top-navbar,
body.index .store-header .top-navbar a,
body.index .store-header .top-navbar i,
body.index .store-header .top-navbar span,
body.index .store-header .top-navbar button {
  color: #2a2118 !important;
}

body.index .store-header .top-navbar .s-search-input,
body.index .store-header .top-navbar .s-search-wrapper {
  color: #2a2118 !important;
  background: transparent !important;
  border: 1px solid rgba(42, 33, 24, 0.32) !important;
  box-shadow: none !important;
}

body.index .store-header .top-navbar .s-search-input::placeholder {
  color: rgba(42, 33, 24, 0.55) !important;
}

body.index .store-header #mainnav:not(.fixed-pinned) .header-btn__icon {
  color: #2a2118;
  background: rgba(255, 255, 255, 0.42);
  border-color: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

body.index .store-header #mainnav:not(.fixed-pinned) .navbar-brand img {
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.22));
}

body.index .store-header #mainnav.fixed-pinned .inner {
  background: #fff !important;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08) !important;
}


/* ============================================================
   [2] بانر الصفحة الرئيسية
   ============================================================ */

body.index .s-block--fixed-banner:first-of-type,
body.index
  .s-block:has(#prestige-rtl-shift-guard)
  + .s-block--fixed-banner {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.index .s-block--fixed-banner:first-of-type > .container,
body.index
  .s-block:has(#prestige-rtl-shift-guard)
  + .s-block--fixed-banner
  > .container {
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.index .s-block--fixed-banner:first-of-type .banner--fixed,
body.index
  .s-block:has(#prestige-rtl-shift-guard)
  + .s-block--fixed-banner
  .banner--fixed {
  display: block;
  overflow: hidden;
  border-radius: 0 !important;
}

body.index .s-block--fixed-banner:first-of-type img,
body.index
  .s-block:has(#prestige-rtl-shift-guard)
  + .s-block--fixed-banner
  img {
  display: block;
  width: 100%;
}


/* ============================================================
   [3] الناف بار العادي — جميع الصفحات الداخلية
   ============================================================ */

body:not(.index) .store-header {
  position: relative !important;
  inset: auto !important;
  background: #fff !important;
}

body:not(.index) .store-header .top-navbar,
body:not(.index) .store-header #mainnav,
body:not(.index) .store-header #mainnav .inner {
  background: #fff !important;
  background-image: none !important;
}

body:not(.index) .store-header #mainnav {
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08) !important;
}

body:not(.index) .store-header .top-navbar,
body:not(.index) .store-header .top-navbar a,
body:not(.index) .store-header .top-navbar i,
body:not(.index) .store-header .top-navbar span,
body:not(.index) .store-header .top-navbar button {
  color: #1f2937 !important;
}

body:not(.index) .store-header .top-navbar .s-search-input,
body:not(.index) .store-header .top-navbar .s-search-wrapper {
  color: #1f2937 !important;
  background: rgba(229, 231, 235, 0.5) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body:not(.index) .store-header .top-navbar .s-search-input::placeholder {
  color: #6b7280 !important;
}

body:not(.index)
  .store-header
  #mainnav:not(.fixed-pinned)
  .header-btn__icon {
  color: var(--color-primary) !important;
  background: #f3f4f6 !important;
  border-color: #e5e7eb !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

body:not(.index) .store-header .navbar-brand img {
  filter: none !important;
}


/* ============================================================
   [4] البريلودر — الصفحة الرئيسية فقط
   ============================================================ */

/*
 * الغطاء الأسود يظهر من أول لحظة في الرئيسية فقط.
 * لن يظهر في المنتجات أو السلة أو التصنيفات.
 */
body.index::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: block;
  background: #080808;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation:
    prestige-preloader-cover-failsafe
    0.01s linear 3s forwards;
}

/*
 * إخفاء الغطاء بعد انتهاء البريلودر
 * أو إذا ظهر سابقًا في الجلسة.
 */
html.prestige-preloader-done body.index::before {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none;
}

html.prestige-preloader-active,
html.prestige-preloader-active body.index {
  overflow: hidden !important;
}


/* طبقة البريلودر */

#prestige-preloader {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #080808;
  opacity: 1;
  visibility: visible;
  isolation: isolate;
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.55s;
}

#prestige-preloader.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}


/* شعار Prestige */

.prestige-preloader__logo {
  display: block;
  width: min(66vw, 430px);
  height: auto;
  overflow: visible;
  color: #e3c7aa;
  filter:
    drop-shadow(
      0 10px 30px rgba(227, 199, 170, 0.08)
    );
}


/* تأثير رسم/كتابة الشعار */

.prestige-preloader__mark {
  fill: currentColor;
  fill-opacity: 0;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  vector-effect: non-scaling-stroke;
  animation:
    prestige-preloader-draw
      1.6s cubic-bezier(0.65, 0, 0.35, 1)
      forwards,
    prestige-preloader-fill
      0.3s ease-out 1.3s forwards;
}


/* ============================================================
   [5] أنيميشن البريلودر
   ============================================================ */

@keyframes prestige-preloader-draw {
  from {
    stroke-dashoffset: 1;
  }

  to {
    stroke-dashoffset: 0;
  }
}

@keyframes prestige-preloader-fill {
  from {
    fill-opacity: 0;
  }

  to {
    fill-opacity: 1;
  }
}

@keyframes prestige-preloader-cover-failsafe {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}


/* ============================================================
   [6] الموبايل
   ============================================================ */

@media (max-width: 480px) {
  .prestige-preloader__logo {
    width: min(78vw, 330px);
  }
}


/* ============================================================
   [7] تقليل الحركة
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  #prestige-preloader {
    transition-duration: 0.2s;
  }

  .prestige-preloader__mark {
    fill-opacity: 1;
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    animation: none;
  }
}