/* ------------------------------------------
📱 ریسپانسیو حرفه‌ای و تمیز برای هدر دو بخشی (بدون جابجایی آیکون)
------------------------------------------- */

header.site-header {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-family: 'Yekan', 'Vazirani Light', 'Tahoma', sans-serif !important;
  position: relative;
  z-index: 100;
}

/* ساختار کلی بخش‌ها */
.header-top,
.header-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 15px;
}

/* -------------------------
🎛 آیکون‌ها و دکمه‌ها
-------------------------- */

/* دکمه‌ها در موبایل */
.menu-toggle,
.cart-icon-btn,
.mobile-user {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  vertical-align: middle;
}

/* آیکون‌های داخل */
.menu-toggle i,
.cart-icon-btn i,
.mobile-user i {
  font-size: 23px;
  color: #222;
  line-height: 1;
}

/* افکت hover — بدون جابجایی */
.menu-toggle:hover,
.cart-icon-btn:hover,
.mobile-user:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(1.04);
}

/* جلوگیری از تغییر در زمان کلیک */
.menu-toggle:active,
.cart-icon-btn:active,
.mobile-user:active {
  transform: scale(1);
}

/* شمارنده سبد خرید */
.cart-icon-btn {
  position: relative;
}
.cart-icon-btn .item-count {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: #ff2d2d;
  color: #fff;
  font-size: 10px;
  border-radius: 50%;
  padding: 1px 5px;
  line-height: 1;
}

/* لوگو */
.top-center .logo img {
  height: 40px;
}

/* -------------------------
📱 موبایل و تبلت
-------------------------- */
@media (max-width: 768px) {

  .menu-toggle {
    display: inline-flex;
  }

  .header-top {
    height: 56px;
    padding: 4px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  /* ترتیب آیکون‌ها */
  .top-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .menu-toggle { order: 1; }
  .cart-icon-btn { order: 2; }
  .mobile-user { order: 3; }

  /* لوگو وسط */
  .top-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .top-center .logo img {
    height: 30px;
  }

  /* بخش راست پنهان */
  .top-right { display: none; }

  /* هدر پایین */
  .header-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 16px;
  }


  /* منوی دسکتاپ در موبایل پنهان */
  .main-nav { display: none !important; }

  /* نسخه موبایل کاربر */
  .desktop-user { display: none; }
  .mobile-user { display: inline-flex; }

  /* منوی موبایل */
  .mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 84%;
    max-width: 420px;
    height: 100vh;
    background: #fff;
    box-shadow: -6px 0 18px rgba(0, 0, 0, 0.12);
    transition: right 0.3s ease;
    z-index: 9999;
    padding-top: 70px;
    overflow-y: auto;
  }
  .mobile-menu.active { right: 0; }

  /* دکمه بستن منو */
  .close-menu {
    position: absolute;
    top: 12px;
    left: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: #222;
  }

  /* لینک‌های منو */
  .mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .mobile-menu li + li { margin-top: 6px; }
  .mobile-menu a {
    display: block;
    padding: 12px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #222;
    font-size: 15px;
    transition: background 0.2s ease;
  }
  .mobile-menu a:hover {
    background: #f5f5f5;
  }

  /* پس‌زمینه تاریک */
  .menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  .menu-overlay.active {
    display: block;
    opacity: 1;
  }
}

/* -------------------------
💻 دسکتاپ
-------------------------- */
@media (min-width: 769px) {
  .menu-toggle,
  .mobile-user,
  .cart-icon-btn,
  .mobile-menu,
  .menu-overlay {
    display: none !important;
  }
}
/* ===============================
📱 زیرمنوها در منوی موبایل
================================ */
.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu .menu-item {
  border-bottom: 1px solid #eee;
}

/* دکمه‌ی منوی اصلی */
.mobile-menu .submenu-toggle {
  width: 100%;
  text-align: right;
  background: none;
  border: none;
  padding: 12px 14px;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #222;
  transition: background 0.2s ease;
}

.mobile-menu .submenu-toggle:hover {
  background: #f9f9f9;
}

/* فلش جهت‌دار */
.mobile-menu .arrow {
  font-size: 13px;
  transition: transform 0.3s ease;
}

/* زیرمنو پنهان پیش‌فرض */
.mobile-menu .submenu {
  display: none;
  background: #fafafa;
  padding: 6px 0 8px 0;
}

/* لینک‌های زیرمنو */
.mobile-menu .submenu a {
  display: block;
  padding: 8px 20px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  transition: background 0.2s ease;
}

.mobile-menu .submenu a:hover {
  background: #f0f0f0;
}

/* وقتی زیرمنو باز است */
.mobile-menu .menu-item.active > .submenu {
  display: block;
}

/* فلش بچرخه هنگام باز شدن */
.mobile-menu .menu-item.active > .submenu-toggle .arrow {
  transform: rotate(180deg);
}
/* لوگو و دکمه بستن کنار هم بالای منوی موبایل */
.top-center-logo-site {
  display: flex;
  justify-content: space-between; /* لوگو سمت چپ، دکمه سمت راست */
  align-items: center;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.top-center-logo-site .logo-mobile img {
  height: 88px;
  width: 170px;
}

.top-center-logo-site #closeMenu {
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: #222;
}
/* بخش بلاگ در منوی موبایل */
.mobile-blog-link-mobil {
  display: flex;
  justify-content: space-between;   /* وسط صفحه */
  align-items: center;
  padding: 12px 0;           /* فاصله بالا و پایین */
  border-top: 1px solid rgba(0, 0, 0, 0.1); /* خط جداکننده از منو */
  margin-top: 8px;           /* فاصله از آیتم آخر منو */
}

/* تصویر بلاگ */
.mobile-blog-link-mobil img {
  height: 36px;              /* ارتفاع مناسب برای موبایل */
  width: auto;
  display: block;
}

/* هاور */
.mobile-blog-link-mobil a:hover {
  opacity: 0.85;
  transform: scale(1.03);
  transition: all 0.2s ease;
}

/* واکنش‌گرا برای موبایل کوچک */
@media (max-width: 360px) {
  .mobile-blog-link-mobil img {
    height: 30px;
  }
}

/* مخفی کردن موبایل در دسکتاپ */
.product-mobile-view { display: none; }

@media (max-width: 768px) {

  .product-wrapper { display: none; } /* دسکتاپ مخفی */

  .product-mobile-view {
    display: block;
    padding: 15px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    margin: 10px auto 90px;
    max-width: 500px;
  }

  /* درصد پسندیدن افقی */
  .like-percentage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ff3b3b;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 10px;
    white-space: nowrap;
  }
  .like-percentage i { font-size: 22px; }

  /* اسلایدر تصاویر */
  .mobile-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 12px;
  }
  .mobile-slider .slides {
    display: flex;
    transition: transform 0.3s ease;
  }
  .mobile-slider img {
    width: 100%;
    flex-shrink: 0;
    border-radius: 12px;
  }
  .slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    font-size: 22px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 2;
  }
  .slide-btn.prev { left: 10px; }
  .slide-btn.next { right: 10px; }

  /* آیکون‌ها */
  .icon-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #f8f8f8;
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 15px;
  }
  .icon-bar button {
    background: none;
    border: none;
    font-size: 22px;
    color: #333;
    cursor: pointer;
  }

  /* مشخصات محصول */
  .product-details {
    text-align: center;
    font-size: 15px;
    color: #444;
    line-height: 1.7;
  }
  .product-details h1 { font-size: 18px; margin-bottom: 10px; font-weight: 700; }

  /* دکمه افزودن به سبد خرید */
  .mobile-add-to-cart {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #007aff, #0056c1);
    z-index: 999;
  }
  .mobile-add-to-cart button {
    width: 100%;
    padding: 14px 0;
    color: #fff;
    font-size: 17px;
    font-weight: bold;
    border: none;
    background: transparent;
    cursor: pointer;
  }
}
.cart-updated {
  animation: cartPulse 0.6s ease;
}

@keyframes cartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
/* نمایش سبد خرید در دسکتاپ */
.cart-dropdown {
  display: block;
}

/* مخفی کردن سبد خرید در موبایل */
@media (max-width: 768px) {
  .cart-dropdown {
    display: none;
  }
}
