/* إخفاء الصفحة مؤقتاً لمنع الرمشة */
html[data-loading="true"] body {
    opacity: 0;
    visibility: hidden;
}
/* =====================
   Root Variables
===================== */
:root {
  --primary: #817b20;
  --secondary: #c0b515;
  --accent: #ffb300;
  --dark: #111;
  --light: #ffffff;
  --gray: #f5f7fa;

  --header-height: 90px;
  --nav-height: 55px;
}

/* =====================
   Reset
===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Cairo", sans-serif;
  background: black;
  margin: 0;
 
 
}
.page-body {
   font-family: "Cairo", sans-serif;
  background: white;
  min-height: 100vh;
  
}


/* =====================
   Top Bar
===================== */
.top-bar {
  background: #000;
  color: #fff;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 14px;
}

.top-left {
  color: #ffffff;
  text-decoration: none;
  position: absolute;
  left: 20px;
  display: flex;
  gap: 15px;
}

.top-left i {
  color: #ffffff;
  cursor: pointer;
  transition: 0.3s;
}

.top-left i:hover {
  color: var(--accent);
}


/* ================= HEADER ================= */

.main-header {
  background:  #fff !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 999;
  width: 100vw;
  left: 0;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  border-radius: 35px 35px 0 0;
  

  box-shadow:
    0 10px 35px rgba(0,0,0,0.08);
}
.main-header {
  transition: all 0.35s ease;
}

.main-header.scrolled {
  border-radius: 0;
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}
.main-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 1px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(129,123,32,0.35),
    transparent
  );
}

/* الصف العلوي */
.header-inner {
  width: 100%;
  padding: 6px 28px 2px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

/* العدسة */
.header-search {
  justify-self: start;
}

.header-search i {
  font-size: 22px;
  cursor: pointer;
  transition: .3s;
}

.header-search i:hover {
  transform: scale(1.15);
  color: var(--primary);
}
/* تنسيق منطقة نتائج البحث عشان تظهر بوضوح */
.search-results-area {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    margin-top: 10px !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    padding: 10px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
}

/* تنسيق كارت المنتج الصغير جوة السيرش */
.search-results-area > div {
    transition: background 0.2s ease;
    border-radius: 6px;
}

.search-results-area > div:hover {
    background: #f8f9fa !important;
    cursor: pointer;
}

/* زرار مشاهدة كل النتائج */
.search-results-area a:hover {
    background: #2ecc71 !important;
    color: #fff !important;
}
.search-results-dropdown {
    position: absolute;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: 0.2s;
}

.dropdown-item:hover { background: #f8fafc; }

.dropdown-item img { width: 40px; height: 40px; object-fit: contain; }

.dropdown-item h4 { font-size: 14px; margin: 0 0 5px 0; color: #1e293b; }

.dropdown-item span { font-size: 12px; color: #2ecc71; font-weight: bold; }

.view-all-results {
    display: block;
    text-align: center;
    padding: 12px;
    background: #f1f5f9;
    color: #1e293b;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: 0.2s;
}

.view-all-results:hover { background: #e2e8f0; color: #2ecc71; }

/* اللوجو */
.header-logo {
  justify-self: center;
}

.header-logo img {
  height: 90px;
  width: auto;
  transform: scaleX(1.5);
}

/* الأيقونات */
.header-icons {
  justify-self: end;
  display: flex;
  gap: 22px;
  margin-right: 100px;
}

.icon-item {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 130%;
  right: 50%;
  transform: translateX(50%);
  
  background: #fff;
  padding: 12px 0;
  min-width: 180px;

  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);

  opacity: 0;
  visibility: hidden;
  transition: 0.35s ease;

  z-index: 999;
}

.icon-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.dropdown-menu li {
  list-style: none;
}

.dropdown-menu a {
  display: block;
  padding: 10px 18px;

  font-size: 14px;
  font-weight: 500;
  color: #806008; /* جولدي */

  text-decoration: none;
  position: relative;
}
.flag {
  width: 18px;
  height: 12px;
  object-fit: cover;
  margin-right: 6px;
  border-radius: 2px;
}

/* underline luxury */
.dropdown-menu a::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 6px;
  width: 0;
  height: 1px;
  background: #806008;
  transition: 0.3s ease;
}

.dropdown-menu a:hover::after {
  width: calc(100% - 36px);
}
/* ================= NAV BAR ================= */

.header-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid #eee;
  margin-top: 4px;
}

.nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  padding: 3px 20px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav-links > li {
  position: relative;
}

.nav-links > li > a {
  background: transparent;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  color: #111;
  padding: 4px 16px;
  border-radius: 12px;
  transition: all 0.25s ease;
  position: relative;
}
.nav-links > li > a {
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    color 0.2s ease;
}

.nav-links > li > a {
  cursor: pointer;
  position: relative;
  isolation: isolate;
}

.nav-links > li > a::before {
  content: "";
  position: absolute;
  inset: 0;

  background: radial-gradient(
    circle at var(--x) var(--y),
    rgba(255,255,255,0.45),
    transparent 40%
  );

  opacity: 0;
  transition: opacity .3s ease;
  z-index: -1;
}

.nav-links > li > a:hover::before {
  opacity: 1;
}
.nav-links > li > a:hover {
  background: #dfcb5e;
  box-shadow:
    0 4px 10px rgba(0,0,0,0.06);
    color: #000;
}

/* ================= MEGA MENU ================= */

.mega-menu {
  position: absolute;
  top: 105%;
  right: 0;
  left: 0;
  width: 100%;

  background: #fff;
  min-width: 240px;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 35px 70px rgba(0,0,0,0.18),
              0 10px 25px rgba(0,0,0,0.08);
  
  /* --- التعديل هنا --- */
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* الماوس يخترق القائمة وهي مخفية ولا كأنها موجودة */
  /* ------------------ */

  transform: translateY(8px) scale(.98);
  transition: all .22s ease;
  padding: 10px 0;
  z-index: 999;
}

/* عند الوقوف على العنصر */
.dropdown-item:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto; /* رجع إحساس الماوس لما القائمة تظهر */
  transform: translateY(0) scale(1);
}

/* عناصر القائمة */
.mega-menu li {
  list-style: none;
}

.mega-menu li a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  text-decoration: none;
  color: #333;
  transition: .25s;
}

.mega-menu li a:hover {
  background: #ddb744;
  padding-right: 26px;
}

/* ================= SUBMENU ================= */

.submenu {
  position: absolute;
  top: -8px;
  right: 100%;

  background: #fff;
  min-width: 220px;
  border-radius: 16px;
  box-shadow: 0 18px 35px rgba(0,0,0,0.1);

  /* --- التعديل هنا أيضاً لضمان الدقة --- */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* ------------------------------------ */

  transform: translateX(10px);
  transition: all .22s ease;
}

/* فتح ناعم */
.has-submenu:hover .submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

/* ================= FLASH SALE ================= */

.flash-sale a {
  color: #806008 !important;
  animation: blink 1s infinite;
}

@keyframes blink {
  50% { opacity: 0.4; }
}

/* ================= MOBILE VERSION ================= */

@media (max-width: 992px) {

  .header-inner {
    grid-template-columns: auto auto;
    gap: 15px;
  }

  .header-logo {
    grid-column: span 2;
  }

  .header-logo img {
    height: 75px;
  }

  .header-icons {
    justify-self: end;
    gap: 18px;
  }

  .nav-links {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 12px;
    gap: 18px;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .mega-menu,
  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-radius: 0;
  }
  @keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.dropdown-menu,
.mega-menu,
.submenu {
  transform-origin: top;
}

.icon-item:hover .dropdown-menu,
.dropdown-item:hover .mega-menu,
.has-submenu:hover .submenu {
  animation: luxuryDrop .28s ease;
}

@keyframes luxuryDrop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
}
.luxury-cursor {
  position: fixed;
  width: 18px;
  height: 18px;
  border-radius: 50%;

  background: rgba(129,123,32,0.35);
  pointer-events: none;

  transform: translate(-50%, -50%);
  transition: transform .15s ease;
  z-index: 99999;
}
.header-wrapper {
  background: black;
  }


  /* ================= HERO BANNER ================= */

.hero-banner {
  position: relative;
  width: 100%;
  padding: 20px;
  background: transparent;
  margin-top: 0;
  padding-top: 0;
}

.hero-content {
  max-width: 1300px;
  margin: auto;

  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.95),
    rgba(255,255,255,0.88)
  );

  border-radius: 32px;

  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;

  padding: 35px 45px;

  box-shadow:
    0 35px 80px rgba(0,0,0,0.18),
    0 10px 25px rgba(0,0,0,0.08);

  backdrop-filter: blur(10px);
}
/* تنسيق صفحة المنتجات الأساسي */
.products-page-wrapper {
    max-width: 1400px;
    margin: 20px auto 60px;
    padding: 0 20px;
}

/* شريط المسار */
.breadcrumb {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
}
.breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
}

/* الهيكل العام (سايد بار + منتجات) */
.products-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* ----------------- السايد بار (الفلاتر) ----------------- */
.filters-sidebar {
    width: 280px;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    flex-shrink: 0;
    position: sticky;
    top: 90px; /* عشان تلزق وإنت بتنزل */
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.filter-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1e293b;
}

.clear-filters {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 13px;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h4 {
    font-size: 15px;
    margin-bottom: 12px;
    color: #334155;
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-list li {
    margin-bottom: 10px;
}

.filter-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
}

/* فلتر السعر */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.price-inputs input {
    width: 100%;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
}

.apply-btn {
    width: 100%;
    padding: 8px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.apply-btn:hover {
    background: #e2e8f0;
}

/* ----------------- منطقة المنتجات ----------------- */
.products-display-area {
    flex: 1;
}

.products-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 20px;
}

.products-top-bar p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.sort-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-box select {
    padding: 8px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    background: #f8fafc;
    cursor: pointer;
}

/* الشبكة (Grid) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* التجاوب مع الموبايل (Responsive) */
@media (max-width: 991px) {
    .products-layout {
        flex-direction: column;
    }
    .filters-sidebar {
        width: 100%;
        position: static;
    }
}
footer {
    background-color: #222;
    color: #fff;
    padding: 40px 20px 20px 20px;
    font-family: Arial, sans-serif;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: auto;
}

.footer-info,
.footer-links,
.footer-social {
    flex: 1 1 250px;
    margin: 10px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin: 10px 0;
}

.footer-links ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: #584d18;
}

.footer-social a {
    margin-right: 10px;
}

.footer-social img {
    width: 30px;
    height: 30px;
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid #444;
    padding-top: 10px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    .footer-social a {
        margin: 5px;
    }
}
/* ════════════════════════════════════════════════
   PRODUCT PAGE — Mobile Fixes (appended)
════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Layout */
  .products-layout {
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0 !important;
  }

  /* Filter sidebar: collapsible on mobile */
  .filters-sidebar {
    width: 100% !important;
    position: static !important;
    border-radius: 14px !important;
    margin: 10px 12px 0 !important;
    width: calc(100% - 24px) !important;
    padding: 14px !important;
    box-sizing: border-box;
  }

  /* Products grid: 2-column */
  #products-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    padding: 10px 12px !important;
  }

  /* Top bar */
  .products-top-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }
  #results-count { font-size: 13px; }
  #sort-select   { font-size: 13px; padding: 8px 10px; }

  /* Page title */
  .products-page-title { font-size: 20px; padding: 16px 12px 0; }

  /* Filter chips */
  .filter-chips { padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .filter-chip  { font-size: 12px; padding: 6px 14px; }

  /* No-results message */
  #no-products-msg { padding: 40px 20px; }
}

@media (max-width: 480px) {
  #products-container { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .filters-sidebar { margin: 8px 8px 0 !important; width: calc(100% - 16px) !important; }
}

@media (max-width: 360px) {
  #products-container { grid-template-columns: 1fr !important; }
}
