/* =================================================
   ORANGE GLASSES - الثيم الغامق (أسود + دهبي)
   امسح الكود القديم كله وحط ده مكانه
   ================================================= */

/* الخطوط - لازم السطر ده يفضل أول سطر في الكود */
@import url("https://fonts.googleapis.com/css2?family=El+Messiri:wght@500;600;700&family=IBM+Plex+Sans+Arabic:wght@400;500;600&display=swap");

/* 1) ألوان المتجر - غيّر أي لون هنا ويتغير في كل المتجر */
:root {
  --og-bg: #0A0C12;        /* الخلفية الأساسية */
  --og-surface: #11141C;   /* خلفية الهيدر والفوتر والكروت */
  --og-raise: #181C27;     /* لما تقف بالماوس */
  --og-line: #262B3A;      /* الخطوط والحدود */
  --og-ink: #F3EFE8;       /* لون الكلام */
  --og-muted: #A9A59D;     /* الكلام الثانوي */
  --og-gold: #D2AE72;      /* الدهبي */
  --og-orange: #F26A10;    /* البرتقالي (للشراء والخصم بس) */
  --og-orange-hi: #FF8A3D;
  --og-plate: #EFEBE4;     /* خلفية صور المنتجات */

  /* ربط ألوان ثيم زد بألواننا */
  --background: var(--og-bg) !important;
  --foreground: var(--og-ink) !important;
  --primary: var(--og-orange) !important;
  --primary-foreground: #FFFFFF !important;
  --secondary: var(--og-surface) !important;
  --muted: var(--og-muted) !important;
  --accent: var(--og-gold) !important;
  --border: var(--og-line) !important;
  --input: var(--og-line) !important;
  --ring: var(--og-gold) !important;
  --font-family: "IBM Plex Sans Arabic", Cairo, sans-serif !important;
  color-scheme: dark;
}

/* 2) الصفحة والخطوط */
body {
  background: var(--og-bg) !important;
  color: var(--og-ink) !important;
  font-family: "IBM Plex Sans Arabic", Cairo, sans-serif !important;
}

h1, h2, h3 {
  font-family: "El Messiri", "IBM Plex Sans Arabic", sans-serif !important;
  font-weight: 600 !important;
}

/* 3) الهيدر: زجاج شفاف بتغبيش + خط دهبي رفيع تحته */
header {
  background: rgba(10, 12, 18, .5) !important;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(210, 174, 114, .45) !important;
  box-shadow: 0 1px 0 rgba(243, 221, 174, .08), 0 10px 30px -18px rgba(0, 0, 0, .6);
  color: var(--og-ink) !important;
}

header a,
header button {
  color: var(--og-ink) !important;
}

header nav a:hover {
  color: var(--og-gold) !important;
}

/* اللوجو أبيض وأكبر عشان يبان على الخلفية الغامقة */
header img[alt="Orange glasses"],
footer img[alt="Orange glasses"] {
  filter: brightness(0) invert(1);
}

header img[alt="Orange glasses"] {
  scale: 1.7;
}

footer img[alt="Orange glasses"] {
  scale: 1.4;
}

/* البنرات: تظهر كاملة بمقاسها من غير قص
   (صور الكمبيوتر 1920×800 وصور الموبايل 828×1400) */
main > section.section-carousel .embla__slide {
  min-height: 0 !important;
  height: auto !important;
  aspect-ratio: 828 / 1400;
}

@media (min-width: 768px) {
  main > section.section-carousel .embla__slide {
    aspect-ratio: 1920 / 800;
  }
}

/* خطوط زرار القائمة في الموبايل */
header button span.absolute.block {
  background: var(--og-ink) !important;
}

/* 4) الأزرار */
.btn-filled {
  background: var(--og-orange) !important;
  border-color: var(--og-orange) !important;
  color: #fff !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
}

.btn-filled:hover {
  background: var(--og-orange-hi) !important;
  border-color: var(--og-orange-hi) !important;
}

/* "أضف للسلة" و "اختر الخيارات" - إطار دهبي */
.btn-outlined {
  background: transparent !important;
  border: 1.5px solid var(--og-gold) !important;
  color: var(--og-gold) !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
}

.btn-outlined:hover {
  background: var(--og-gold) !important;
  color: #1A1408 !important;
}

/* 5) كروت المنتجات */
[data-product-card] {
  background: var(--og-surface);
  border: 1px solid var(--og-line);
  border-radius: 18px;
  padding: 0 0 16px;
  overflow: hidden;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1), border-color .5s, box-shadow .5s;
}

[data-product-card]:hover {
  transform: translateY(-8px);
  border-color: rgba(210, 174, 114, .55);
  box-shadow: 0 28px 50px -24px rgba(210, 174, 114, .3);
}

/* صورة المنتج على خلفية فاتحة */
[data-product-card] > a:first-child {
  background: var(--og-plate);
  border-radius: 0 !important;
}

[data-product-card] > a:first-child img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: 6%;
  mix-blend-mode: multiply;
}

/* المسافات جوه الكارت */
[data-product-card] > :not(:first-child) {
  padding-inline: 16px;
}

[data-product-card] h3,
[data-product-card] h3 a {
  color: var(--og-ink) !important;
  font-size: 1.1rem !important;
}

/* السعر */
[data-product-card] p.font-semibold {
  color: var(--og-ink) !important;
  font-family: "El Messiri", sans-serif;
  font-size: 1.35rem !important;
  font-weight: 600 !important;
}

/* السعر قبل الخصم (في كل المتجر) */
.line-through {
  color: var(--og-muted) !important;
}

/* علامة "خصم %" (في كل المتجر) */
[class*="bg-success"] {
  background: var(--og-orange) !important;
  color: #fff !important;
  border-radius: 999px !important;
}

/* صفحة المنتج: الصورة الكبيرة على خلفية فاتحة */
.product-gallery__slide {
  background: var(--og-plate) !important;
  border-radius: 18px;
  overflow: hidden;
}

.product-gallery__slide img {
  mix-blend-mode: multiply;
}

/* علامة "معفى من الضريبة" */
[data-product-card] .badge {
  background: #E1EFE6 !important;
  color: #17613B !important;
  border-radius: 999px !important;
}

/* زرار المفضلة (القلب) */
[data-product-card] [data-wishlist-btn] {
  background: #fff !important;
  color: #14213A !important;
  border-radius: 50% !important;
}

/* 6) عناوين الأقسام - كبيرة بخط El Messiri */
main section h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem) !important;
  color: var(--og-ink) !important;
}

/* 7) التصنيفات - كروت صور طويلة والاسم فوق الصورة */
section.section-categories .embla__container {
  display: flex !important;
  flex-wrap: nowrap !important;
}

section.section-categories .embla__slide {
  flex: 0 0 25% !important;      /* كمبيوتر: 4 كروت */
  width: 25% !important;
  min-width: 0 !important;
  padding-inline: 8px;
}

section.section-categories .embla__slide > a {
  position: relative !important;
  display: block !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  background: var(--og-surface);
}

section.section-categories .embla__slide > a > div.overflow-hidden.rounded {
  border-radius: 18px !important;
}

section.section-categories .embla__slide > a > div.overflow-hidden.rounded > img {
  display: block !important;
  width: 100% !important;
  aspect-ratio: 3 / 4 !important;
  object-fit: cover !important;
  transition: transform .7s ease !important;
}

section.section-categories .embla__slide > a:hover img {
  transform: scale(1.06) !important;
}

/* تدرّج غامق تحت الصورة عشان الاسم يبان */
section.section-categories .embla__slide > a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10, 12, 18, .9) 0%, rgba(10, 12, 18, 0) 52%);
  pointer-events: none;
}

section.section-categories .embla__slide > a h3 {
  position: absolute !important;
  inset-inline: 20px;
  bottom: 18px;
  z-index: 1;
  margin: 0 !important;
  color: var(--og-ink) !important;
  font-size: 1.5rem !important;
  text-align: start !important;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

section.section-categories .embla__slide > a:hover h3 {
  transform: translateY(-8px);
}

/* 8) "نظارة لكل لحظة" - قسم مجموعة الصور (4 صور) زي التصميم */
.section-gallery {
  background: transparent !important;
}

.section-gallery [data-items-count="4"] {
  display: grid !important;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) !important;
  grid-template-rows: 1fr 1fr !important;
  gap: 16px !important;
  height: min(70vw, 640px);
}

.section-gallery [data-items-count="4"] > * {
  min-width: 0;
  position: relative;
  border-radius: 18px !important;
  overflow: hidden !important;
  background: var(--og-surface);
}

/* الكارت الكبير (الصورة الأولى) على اليمين بطول القسم */
.section-gallery [data-items-count="4"] > :nth-child(1) {
  grid-row: 1 / span 2;
}

/* الكارت العريض (الصورة الرابعة) تحت */
.section-gallery [data-items-count="4"] > :nth-child(4) {
  grid-column: 2 / span 2;
}

.section-gallery [data-items-count="4"] .media-wrap {
  aspect-ratio: auto !important;
  height: 100% !important;
  width: 100% !important;
}

.section-gallery [data-items-count="4"] img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform .7s ease;
}

.section-gallery [data-items-count="4"] > :hover img {
  transform: scale(1.05);
}

/* تدرّج غامق تحت كل صورة */
.section-gallery [data-items-count="4"] > *::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10, 12, 18, .82) 0%, rgba(10, 12, 18, 0) 45%);
  pointer-events: none;
}

/* اسم كل كارت */
.section-gallery [data-items-count="4"] > *::before {
  position: absolute;
  inset-inline: 18px;
  bottom: 14px;
  z-index: 2;
  font-family: "El Messiri", sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--og-ink);
  pointer-events: none;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

.section-gallery [data-items-count="4"] > :hover::before {
  transform: translateY(-6px);
}

.section-gallery [data-items-count="4"] > :nth-child(1)::before { content: "إجازتك"; }
.section-gallery [data-items-count="4"] > :nth-child(2)::before { content: "طريقك"; }
.section-gallery [data-items-count="4"] > :nth-child(3)::before { content: "سفرك"; }
.section-gallery [data-items-count="4"] > :nth-child(4)::before { content: "مدينتك"; }

/* موبايل: كارت كبير فوق، اتنين جنب بعض، وكارت عريض تحت */
@media (max-width: 768px) {
  .section-gallery [data-items-count="4"] {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    gap: 10px !important;
    height: auto;
  }

  .section-gallery [data-items-count="4"] > * {
    aspect-ratio: 4 / 3;
    border-radius: 14px !important;
  }

  .section-gallery [data-items-count="4"] > :nth-child(1),
  .section-gallery [data-items-count="4"] > :nth-child(4) {
    grid-row: auto;
    grid-column: 1 / span 2;
    aspect-ratio: 16 / 10;
  }

  .section-gallery [data-items-count="4"] > *::before {
    font-size: 1.15rem;
    inset-inline: 14px;
    bottom: 10px;
  }
}

/* 9) قسم المميزات والفوتر */
.section-benefits,
footer {
  background: var(--og-surface) !important;
  color: var(--og-ink) !important;
  border-top: 1px solid var(--og-line);
}

.section-benefits svg {
  color: var(--og-gold) !important;
}

footer a {
  color: var(--og-muted) !important;
}

footer a:hover {
  color: var(--og-ink) !important;
}

/* 10) الخانات (البحث، الكمية، تسجيل الدخول) */
input,
select,
textarea {
  background: var(--og-surface) !important;
  color: var(--og-ink) !important;
  border-color: var(--og-line) !important;
}

/* 11) تابلت وموبايل */
@media (max-width: 1024px) {
  section.section-categories .embla__slide {
    flex: 0 0 33.333% !important;
    width: 33.333% !important;
  }
}

@media (max-width: 768px) {
  section.section-categories .embla__slide {
    flex: 0 0 46% !important;     /* موبايل: كارتين وجزء من التالت */
    width: 46% !important;
    padding-inline: 5px;
  }

  section.section-categories .embla__slide > a h3 {
    font-size: 1.15rem !important;
    inset-inline: 14px;
    bottom: 14px;
  }

  [data-product-card] {
    border-radius: 14px;
  }

  [data-product-card] > :not(:first-child) {
    padding-inline: 10px;
  }

  [data-product-card] p.font-semibold {
    font-size: 1.15rem !important;
  }
}

/* =================================================
   12) لمسات حركة وتفاصيل دهبي
   ================================================= */

/* البنر الرئيسي: زووم هادي أول ما الصفحة تفتح */
main > section.section-carousel:nth-of-type(1) img {
  animation: og-zoom 2.8s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes og-zoom {
  from { scale: 1.08; }
  to   { scale: 1; }
}

/* خط دهبي صغير تحت عناوين الأقسام */
.section-categories h2,
.section-products h2,
.section-gallery h2 {
  position: relative;
  padding-bottom: 14px;
}

.section-categories h2::after,
.section-products h2::after,
.section-gallery h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 56px;
  height: 2px;
  background: linear-gradient(90deg, var(--og-gold), #F3DDAE);
}

/* اسم التصنيف يبقى دهبي لما تقف عليه */
section.section-categories .embla__slide > a:hover h3 {
  color: var(--og-gold) !important;
}

/* صورة المنتج تكبر شوية لما تقف على الكارت */
[data-product-card] > a:first-child img {
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}

[data-product-card]:hover > a:first-child img {
  transform: scale(1.06);
}

/* لمعة بتعدّي على زرار الشراء البرتقالي */
.btn {
  position: relative;
  overflow: hidden;
}

.btn-filled::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .38) 50%, transparent 70%);
  transform: translateX(130%);
  transition: transform .8s;
}

.btn-filled:hover::after {
  transform: translateX(-130%);
}

/* أيقونات قسم المميزات بلون دهبي */
.section-benefits {
  border-block: 1px solid rgba(210, 174, 114, .15);
}

.section-benefits img {
  filter: sepia(.5) saturate(1.6) hue-rotate(-12deg) brightness(1.05);
}

/* روابط الفوتر دهبي لما تقف عليها */
footer a:hover {
  color: var(--og-gold) !important;
}

/* الأقسام بتظهر بنعومة وإنت بتنزل في الصفحة (المتصفحات الحديثة بس) */
@supports (animation-timeline: view()) {
  .section-categories .theme-container,
  .section-products .theme-container,
  .section-gallery .theme-container,
  .section-benefits .theme-container {
    animation: og-reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }

  @keyframes og-reveal {
    from { opacity: 0; transform: translateY(34px); }
    to   { opacity: 1; transform: none; }
  }
}

/* لو العميل مفعّل "تقليل الحركة" في جهازه، نوقف الحركات */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}