* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #646cff;
    --indigo-color: #4f46e5; 
    --bg-dark: #242424;
    --text-light: rgba(255, 255, 255, 0.87);
}
html, body {
      overflow-x: hidden;
      margin: 0;
      padding: 0;
    }
body {overflow-x: hidden;
    direction: rtl;
    text-align: right;
    font-family: "IRANSans", Tahoma, sans-serif !important;
    background-color: #fff;
    min-height: 100vh;
}


.glass-header {
    background: rgba(255, 255, 255, 255) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 50;
}

.glass-header .nav-link {
    color: #333 !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.glass-header .nav-link:hover {
    color: var(--indigo-color) !important;
    background-color: rgba(79, 70, 229, 0.1) !important; 
}


.btn-outline-indigo {
    border-color: var(--indigo-color);
    color: var(--indigo-color);
}
.btn-outline-indigo:hover {
    background-color: var(--indigo-color);
    color: white !important;
}

.btn-indigo {
    background-color: var(--indigo-color);
    border-color: var(--indigo-color);
    color: white;
}
.btn-indigo:hover {
    background-color: #4338ca; 
    border-color: #4338ca;
}


.glass-header svg {
    fill: #000;
}
.btn-outline-indigo:hover svg, .btn-indigo:hover svg {
    fill: white;
}

#mobile-menu {
    z-index: 60; 
    display: none;
    backdrop-filter: blur(2px);
    background: rgba(0,0,0,0.3);
}
#mobile-menu-content {
    transform: translateX(100%);
    transition: transform .35s ease;
    background-color: white;
    max-width: 288px;
}
.shadow-lg { box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important; }

@media (max-width: 1023px) {
    #sidebar-container {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 300px !important;
        height: 100vh !important;
        background: white !important;
        z-index: 9999 !important;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1) !important;
        overflow-y: auto !important;
        display: block !important;
    }
    #filter-toggle:checked ~ div #sidebar-container,
    #filter-toggle:checked ~ #sidebar-container {
        right: 0 !important;
    }
}

.auth-card { background: #ffffff; border-radius: 15px; border: 1px solid #eee; box-shadow: 0 10px 30px rgba(0,0,0,0.04); padding: 2rem; }

button, .btn-custom { border-radius: 8px; padding: 0.6em 1.2em; font-weight: 500; transition: all 0.25s ease; cursor: pointer; }

/* تنظیمات پایه سایدبار برای دسکتاپ (بالای 1024px) */
@media (min-width: 1025px) {
    #sidebar-container {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 280px;
        background-color: #ffffff;
        border-left: 1px solid #eee;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        overflow: visible;
    }
    #sidebar-container.collapsed { width: 70px; }
    #sidebar-container.collapsed .menu-text { display: none; }
    #sidebar-container.collapsed .nav-item:hover .submenu-box {
        display: block; position: absolute; right: 70px; top: 0; width: 200px;
        background: #fff; box-shadow: -5px 5px 15px rgba(0,0,0,0.1);
        border-radius: 8px 0 0 8px; padding: 10px;
    }
}
.submenu-box { display: none; }
.menu-icon { width: 30px; text-align: center; font-size: 1.2rem; }
.group:hover .dropdown-menu {
  display: flex !important;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  width: 80vw;
  max-width: 900px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-top: 2px solid #2563eb;
  padding: 1.5rem;
  display: none; 
  gap: 1.5rem;
  z-index: 50;
}
.w-32 {
  display: flex;
}
.logo-category-wrap{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.logo-category-wrap a {
      order: -1; /* لوگو را ببر اول */
    }
.category-dropdown{
  position: relative;
}

.category-dropdown .dropdown-toggle{
  background: rgba(106, 37, 165, 0.75);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.category-dropdown .dropdown-toggle i{
  font-size: 0.9rem;
}

.category-dropdown .dropdown-menu{
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  min-width: 220px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,.12);
  padding: 0;
  list-style: none;
  z-index: 999;
}

.category-dropdown:hover .dropdown-menu{
  display: block;
}

.category-dropdown .dropdown-menu li a{
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: #333;
}

.category-dropdown .dropdown-menu li a:hover{
  background: rgba(106, 37, 165, 0.08);
}
.dropdown-toggle::after {
  display: none !important; 
}
/* از تبلت به بالا */
@media (min-width: 768px){
  .logo-category-wrap{
    flex-direction: column; 
    align-items: flex-end;
  }
}

/* موبایل */
@media (max-width: 767.98px){
  .category-dropdown{
    display: none !important;
  }
}
@media (max-width: 991.98px) {
  .dropdown-menu {
    position: static;
    width: 100%;
    background: #f8f9fa;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    display: none;
  }

  .dropdown-menu.active {
    display: block;
  }

  .dropdown-menu > * {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
  }

  .dropdown-menu > *:last-child {
    border-bottom: none;
  }

  .dropdown-menu h4 {
    margin-bottom: 0.5rem;
  }

  .dropdown-menu ul {
    padding-right: 1rem;
  }
}

.group.active svg.fa-chevron-down {
  transform: rotate(180deg);
}
#mobile-menu.visible {
   display: block;
   opacity: 1;
}
/* استایل های پیش فرض برای mobile-menu-content و ... */
/* ... (کدهای قبلی شما) ... */


/* استایل های جدید برای dropdown */

/* وقتی dropdown فعال است */
.nav-item.group .dropdown-menu.active {
  display: block; /* نمایش داده می شود */
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* استایل برای چرخش آیکون */
.nav-item.group .nav-link .svg-chevron-down {
  transition: transform 0.3s ease-in-out;
}

.nav-item.group .nav-link.open .svg-chevron-down {
  transform: rotate(180deg); /* چرخش 180 درجه */
}



/* استایل های موبایل (اگر ناوبری شما ریسپانسیو است) */
@media (max-width: 991.98px) {
  .nav-item.group .dropdown-menu {
    position: static; /* در موبایل، dropdown باید زیر لینک نمایش داده شود */
    display: none; /* مخفی پیش فرض */
    transform: none !important; /* غیرفعال کردن transition دسکتاپ */
    box-shadow: none; /* بدون سایه */
    opacity: 1; /* همیشه قابل مشاهده در حالت فعال */
    visibility: visible; /* همیشه قابل مشاهده در حالت فعال */
    background-color: #f8f9fa; /* رنگ پس زمینه متفاوت در موبایل */
    width: 100%; /* عرض کامل */
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    margin-top: 0.25rem;
    border-radius: 0.25rem;
  }

  .nav-item.group .dropdown-menu.active {
    display: block; /* نمایش داده می شود */
  }

  /* استایل های مربوط به چرخش آیکون در موبایل */
  .nav-item.group .nav-link.open .svg-chevron-down {
    transform: rotate(180deg);
  }
}
/* کانتینر اصلی: فلکس، راست‌چین، فاصله ۴.۵ سانت از سمت راست */
.breadcrumb-flex {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px; /* فاصله بین آیتم‌ها به جای اسلش یا آیکون */
  list-style: none;
  margin: 0;
  padding: 0;
  direction: rtl;
  margin-right: 4.5cm; /* دقیقاً ۴.۵ سانت از لبه راست */
}

/* خود متن‌ها (تگ a) */
.breadcrumb-flex a {
  display: inline-flex;
  align-items: center;
  background-color: #f8f9fa;
  border-radius: 4px; 
  padding: 6px 14px;
  color: #000000; 
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.breadcrumb-flex a:hover {
  background-color: #6a25a5;
  color: #ffffff;
}

@media (min-width: 768px) {
  #userboxBtn {
    background: rgba(106, 37, 165, 0.75);
    border: 1px solid rgba(106, 37, 165, 0.75);
    padding: 0 12px;
    width: 160px;
  }

  #userboxBtn .btn-text {
    display: inline-block;
    color: #fff;
    font-size: 15px;
    margin-left: 6px;
    white-space: nowrap;
  }

 .user-icon-box {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  background: #fff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-icon-box i {
  color: rgba(106, 37, 165, 0.75);
  font-size: 18px;
  line-height: 1;
}

}

@media (max-width: 768px) {
     .breadcrumb {
    gap: 0.25rem;
  }
  .breadcrumb li:not(:last-child)::after {
    margin: 0 0.3rem;
  }
  
  #userboxBtn {
  width: 35px;
  height: 35px;
  max-width: 35px;
  max-height: 35px;
 background: none;
   border:1px solid rgba(106, 37, 165, 0.75);
     
  }

 
 
  #userboxBtn .btn-text {
    display: none !important;
  }
  .user-icon-box {
  width: 37px;
  height: 37px;
  min-width: 32px;
  min-height: 32px;
  background: #fff;
  border:2px solid rgba(106, 37, 165, 0.75);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
margin-right:-6px;}

.user-icon-box i {
  color: rgba(106, 37, 165, 0.75);
  font-size: 18px;
  line-height: 1;
}
}

.product-scroll::-webkit-scrollbar {
  height: 6px;
}
.product-scroll::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 10px;
}

/* کارت */
.product-card {
  width: 320px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  overflow: hidden;
}

/* ربان */
.ribbon {
  position: absolute;
  top: 15px;
  right: -40px;
  background: #ff4757;
  color: #fff;
  padding: 5px 40px;
  font-size: 12px;
  transform: rotate(45deg);
  font-weight: 500;
}

/* عنوان */
.product-title {
  font-weight: 600;
}

/* دسته بندی فقط مجاز به وارپ */
.category span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* جلوگیری از وارپ سایر بخش‌ها */
.meta,
.specs,
.actions,
.price {
  white-space: nowrap;
}

/* مشخصات */
.specs {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
}

.specs small {
  color: #6c757d;
  display: block;
  font-size: 11px;
}

.divider {
  color: #ccc;
  padding: 0 4px;
}

/* قیمت */
.old-price {
  font-size: 13px;
}

.new-price {
  color: #198754;
}

.currency {
  font-size: 13px;
  font-weight: normal;
}
