/* ===============================
    Hamburger Drawer + Cart Badge
    (این فایل باید تو همه صفحات لینک بشه)
==================================*/

/* پس‌زمینه تیره پشت منو */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease;
  z-index: 998;
}

.menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* پنل منو - از سمت راست صفحه باز می‌شود، حدود ۱/۶ عرض صفحه */
.menu-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 16.6667%;   /* تقریبا ۱ از ۶ عرض صفحه، طبق درخواست */
  min-width: 260px;  /* تا تو صفحه‌های متوسط خیلی باریک نشه و متن جا بشه */
  max-width: 320px;  /* تا تو مانیتورهای خیلی بزرگ بیش‌ازحد پهن نشه */
  background: #ffffff;
  box-shadow: -12px 0 35px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.menu-drawer.open {
  transform: translateX(0);
}

.menu-drawer-close {
  align-self: flex-start;
  margin: 14px 14px 20px;
  background: var(--c-primary-light);
  border: none;
  color: var(--c-primary);
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: .25s;
}

.menu-drawer-close:hover {
  background: var(--c-primary-soft);
  color: #fff;
}

/* عکس ورودی مغازه - بالای منو */
.menu-drawer-photo {
  width: 100%;
  height: 170px;
  margin-top: 14px;
  overflow: hidden;
  background: var(--c-primary-light);
  flex-shrink: 0;
}

.menu-drawer-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* لیست لینک‌ها */
.menu-drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 6px;
}

/* دکمه حالت تاریک - همیشه آخرین آیتم منو، بعد از «ارتباط با ما».
   استایل کامل (فاصله از پایین، فونت) تو dark-mode.css تعریف شده،
   چون اون فایل بعد از این فایل لود می‌شه. */

.menu-drawer-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--c-text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  padding: 13px 12px;
  border-radius: 12px;
  transition: background .25s, color .25s;
}

.menu-drawer-label {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-drawer-nav a i {
  width: 20px;
  text-align: center;
  color: var(--c-primary);
  font-size: 1.05rem;
  flex-shrink: 0;
}

.menu-drawer-nav a:hover {
  background: var(--c-primary-light);
  color: var(--c-primary);
}

/* جلوگیری از اسکرول پس‌زمینه وقتی منو بازه */
body.menu-open {
  overflow: hidden;
}

/* حداقل اندازه برای دکمه‌های آیکون‌دار هدر، تا حتی اگه فونت آیکون
   (Font Awesome) به هر دلیلی دیر لود بشه، باز هم قابل کلیک بمونن */
.menu-btn,
.header-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
}

/* ================= بج شمارنده سبد خرید ================= */

/* روی آیکون سبد خرید تو هدر */
.cartShop_icons {
  position: relative;
}

.cart-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  background: var(--c-accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  position: absolute;
  top: -6px;
  left: -8px;
  line-height: 1;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
}

/* همون بج ولی داخل منوی همبرگری، کنار متن (نه گوشه‌ی مطلق) */
.menu-drawer-nav a .cart-badge {
  position: static;
  top: auto;
  left: auto;
}

/* ================= بج شمارنده‌ی علاقه‌مندی‌ها (آیکون قلب هدر) ================= */

/* روی آیکون قلب تو هدر */
.favShop_icons {
  position: relative;
}

.fav-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  background: #e0245e;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  position: absolute;
  top: -6px;
  left: -8px;
  line-height: 1;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
}

/* همون بج ولی داخل منوی همبرگری، کنار متن (نه گوشه‌ی مطلق) */
.menu-drawer-nav a .fav-badge {
  position: static;
  top: auto;
  left: auto;
}

/* ================= واکنش‌گرا ================= */
@media (max-width: 768px) {
  .menu-drawer {
    width: 70%;
    min-width: 230px;
    max-width: 290px;
  }
}

/* ================= پیشنهادهای سرچ‌باکس (اتوکامپلیت) ================= */
.search-box-relative {
  position: relative;
}

.search-suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  z-index: 500;
  max-height: 320px;
  overflow-y: auto;
}

.search-suggestions.open {
  display: block;
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  cursor: pointer;
  color: var(--c-text);
  font-size: .95rem;
  transition: background .15s;
}

.search-suggestion-item i {
  color: var(--c-primary-soft);
  font-size: .85rem;
  flex-shrink: 0;
}

.search-suggestion-item strong {
  color: var(--c-primary);
  font-weight: 800;
}

.search-suggestion-item:hover,
.search-suggestion-item.active {
  background: var(--c-primary-light);
}

.search-suggestion-item + .search-suggestion-item {
  border-top: 1px solid var(--c-border);
}
