/* =========================================
   HEADER – FIXED DESKTOP
========================================= */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(13, 28, 46, 0.95);
  backdrop-filter: blur(8px);
  padding: 10px 3%;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  box-sizing: border-box;
}

/* گروه چپ: لوگو + منوی دسکتاپ */
.left-header {
  display: flex;
  align-items: center;
  gap: 40px;
}

/* LOGO */
.logo img {
  height: 70px;
  width: auto;
  transition: .3s;
}
.logo img:hover {
  transform: scale(1.05);
}

/* *** فقط روی منوی دسکتاپ اعمال شود *** */
.desktop-nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.desktop-nav ul li {
  margin: 0 15px;
  position: relative;
}
.desktop-nav ul li a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
  transition: .3s;
}
.desktop-nav ul li a:hover {
  color: var(--light);
}

/* =========================================
   PRODUCTS DROPDOWN – DESKTOP
========================================= */

/* فلش کنار Products */
.products > a::after {
  content: " ▼";
  font-size: 11px;
  color: var(--gold);
  margin-left: 5px;
}

/* باکس منوی محصولات */
.products {
  position: relative;
}

.products .submenu {
  position: absolute;
  top: 45px;               /* فاصله از کلمه Products */
  left: 0;
  background: rgba(13, 28, 46, 0.98);
  border-radius: 12px;
  min-width: 230px;
  padding: 18px 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.35);

  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: .25s ease;
  z-index: 1000;
}

/* نمایش با هاور – مثل قبل */
.products:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu-title {
  font-weight: 700;
  color: var(--gold);
  font-size: 15px;
  margin: 10px 0 6px;
}

.submenu hr {
  border: none;
  border-top: 1px solid rgba(198,162,90,0.35);
  margin: 12px 0;
}

.submenu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.submenu ul li a {
  display: block;
  font-size: 14px;
  color: var(--cream);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: .2s;
}
.submenu ul li a:hover {
  background: var(--gold);
  color: var(--navy);
  padding-left: 12px;
}

/* =========================================
   LANGUAGE SELECTOR – ثابت گوشه راست
========================================= */

.language-selector {
  position: absolute;
  top: 22px;
  right: 40px;                 /* کمی فاصله از دیواره راست */
  z-index: 99999;
}

.lang-btn {
  background: transparent;
  border: 2px solid var(--gold);
  width: 55px;
  height: 55px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 25px;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* DROPDOWN زبان */
.lang-menu {
  position: absolute;
  right: 0;
  top: 60px;
  background: rgba(13,28,46,0.97);
  min-width: 80px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: .25s ease;
}

.language-selector:hover .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-menu li {
  list-style: none;
}
.lang-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .5px;
  text-transform: uppercase;
  text-decoration: none;
}
.lang-menu li a:hover {
  background: var(--gold);
  color: var(--navy);
}

/* ـــــــــــــــــــــــــــــــــــــــ
   پنهان‌کردن همبرگری و منوی موبایل در دسکتاپ
ـــــــــــــــــــــــــــــــــــــــ */
.hamburger,
.mobile-nav {
  display: none !important;
}

/* =======================================================
   PERFECT MOBILE HEADER – ALL LANGUAGES
======================================================= */
@media (max-width: 768px) {

  /* دسکتاپ ناو تو موبایل نباشه */
  .desktop-nav {
    display: none !important;
  }

  /* هدر: فقط ظرف ثابت بالای صفحه */
  header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 75px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;  /* برای وسط قرار گرفتن لوگو */
    background-color: rgba(13, 28, 46, 0.95);
    z-index: 9999;
    box-sizing: border-box;
  }

  /* فقط برای اینکه چیزی به چپ/راست هل نده */
  .left-header {
    flex: 1;
  }

  /* لوگو دقیقاً وسط */
  header .logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
  }

  header .logo img {
    height: 55px !important;
    width: auto;
  }

  /* همبرگری: گوشه چپ، وسط عمودی */
  .hamburger {
    display: block !important;
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 30px;
    color: var(--gold);
    z-index: 12000;
    cursor: pointer;
  }

  /* زبان: گوشه راست، وسط عمودی */
  .language-selector {
    position: absolute !important;
    right: 18px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: auto !important;
    z-index: 12000 !important;
  }

  .lang-btn {
    width: 42px;
    height: 42px;
    font-size: 20px;
    border-radius: 50%;
  }

  /* ===== منوی موبایل (پنل کشویی) ===== */
 /* ===== منوی موبایل (پنل کشویی) — همیشه از چپ باز شود ===== */
.mobile-nav {
  display: block !important;
  position: fixed;
  top: 0;
  left: -100%;          /* اول بیرون صفحه در سمت چپ */
  right: auto;          /* جلوگیری از override */
  width: 70%;
  max-width: 320px;
  height: 100vh;
  background: rgba(13, 28, 46, 0.98);
  padding: 100px 25px 40px;
  box-sizing: border-box;
  z-index: 11000;
  overflow-y: auto;
  transition: left 0.35s ease;   /* انیمیشن روی LEFT */
}

.mobile-nav.open {
  left: 0 !important;    /* ورود از چپ */
  right: auto !important;
}

  .mobile-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .mobile-menu li a {
    color: var(--gold);
    font-size: 19px;
    font-weight: 600;
    text-decoration: none;
  }

  /* دکمه "Products / محصولات" در موبایل */
 .mobile-dropdown .dropdown-btn {
    background: none;
    border: none;
    padding: 0;
    width: auto;                 /* ← دیگر پهنای کل نگیرد */
    font-size: 19px;
    font-weight: 600;
    color: var(--gold);
    display: inline-flex;        /* ← نه تمام عرض */
    align-items: center;
    gap: 4px;                    /* ← فلش بچسبد */
}


  .mobile-dropdown .arrow {
    font-size: 14px;
    transition: .3s;
  }

  .dropdown-btn.active .arrow {
    transform: rotate(180deg);
  }

  .dropdown-content {
    display: none;
    margin-top: 10px;
    padding-left: 10px;
  }

  .dropdown-content.open {
    display: block;
  }

  .group-title {
    color: var(--gold);
    margin: 10px 0 6px;
    font-weight: 700;
    font-size: 16px;
  }

  .dropdown-content li a {
    color: var(--cream);
    font-size: 17px;
    padding: 3px 0;
    display: block;
  }

  /* ===== اصلاح RTL برای FA و AR — فقط متن، نه چیدمان ===== */
html[lang="fa"] .mobile-menu li a,
html[lang="ar"] .mobile-menu li a {
  direction: rtl;
  text-align: right;
}

/* دکمه محصولات در RTL */
html[lang="fa"] .dropdown-btn,
html[lang="ar"] .dropdown-btn {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

/* لیست گروه‌ها */
html[lang="fa"] .dropdown-content,
html[lang="ar"] .dropdown-content {
  direction: rtl;
  text-align: right;
}


}
