* {
  direction: rtl !important;
  unicode-bidi: embed !important;
}
@font-face {
    font-family: 'Byekan';
    src: url('../../../fonts/B_Yekan/Yekan.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
  }
@font-face {
  font-family: 'english';
  src: url(./fonts/assistant_n4.9120912a469cad1cc292572851508ca49d12e768\ \(1\)\ \(1\).woff2);
}
@font-face {
  font-family: 'classic';
  src: url(./fonts/CAMBRIA.TTC);
}
@font-face {
  font-family: 'Bnazanin';
  src: url(./fonts/B-NAZANIN.TTF);
}
body {
  margin: 0;
  padding-top: 60px;
  background: #f9f9f9;
  direction: rtl;
  background: #f9f9f9;
  overflow-x: hidden; /* حذف اسکرول افقی */
  font-family: 'Byekan', tahoma, sans-serif;
}

/* هدر */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: black;
  color: #fff;
  z-index: 1000;
  box-shadow: none;
  border-bottom: none;
  font-size: 1.2rem;
  margin: 0;
}
header, .header-row, nav, .nav-links { 
  direction: rtl !important;
  unicode-bidi: plaintext !important;
   }
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
}
.brand img{
  height: 65px;   /* هر اندازه‌ای که می‌خوای */
  width: auto;    /* نسبت تصویر حفظ میشه */
  display: block; /* جلوگیری از فاصله اضافی */
  margin: 0;
}
nav ul.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 16px;
}

nav ul.nav-links li {
  position: relative;
}

nav ul.nav-links li a {
  display: block;
  padding: 8px 12px;
  margin: 0;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

/* سطح دوم */
nav ul.nav-links li > ul {
  list-style: none;
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: black;
  min-width: 160px;
  z-index: 1000;
}

nav ul.nav-links li ul li {
  margin: 0;
  padding: 0;
}
nav ul.nav-links li ul li a {
  display: block;
  padding: 8px 12px;
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
}
/* سطح سوم */
nav ul.nav-links li > ul > li > ul {
  list-style: none;
  display: none;
  position: absolute;
  top: 0;
  right: 100%;
  background: black;
  min-width: 160px;
  z-index: 1000;
}


/* نمایش سطح دوم هنگام hover */
nav ul.nav-links li:hover > ul {
  display: block;
}

/* نمایش سطح سوم هنگام hover روی آیتم سطح دوم */
nav ul.nav-links li > ul > li:hover > ul {
  display: block;
}

/* خط قرمز زیر منو ها */
.nav-links li .menue {
  position: relative;
  display: inline-block;
  padding: 8px 12px;
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* خط قرمز مخفی اولیه */
.nav-links li .menue::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  height: 2px;
  width: 0;
  background-color: red;
  transition: width 0.3s ease;
}

/* هنگام هاور، خط قرمز ظاهر میشه */
.nav-links li .menue:hover::after {
  width: 100%;
  left: 0;
  right: auto;
}
.searchIcon{
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.searchIcon .cartButton{
  margin-left: 0.5rem;
  cursor: pointer;
  background-color: black;
  border-radius: 0.5rem;
  border: none;
  transition: background-color ease 0.7s;
  margin-right:15px;
  margin-left: 20px;
}
.searchIcon .cartButton img{
  height: 50px;   /* هر اندازه‌ای که می‌خوای */
  width: auto;    /* نسبت تصویر حفظ میشه */
}
.searchIcon .cartButton p{
  color: grey;
}
.searchIcon .search{
  cursor: pointer;
  background-color: black;
  border-radius: 0.5rem;
  border: none;
  transition: background-color ease 0.7s;
  height: 25px;   /* هر اندازه‌ای که می‌خوای */
  width: auto;    /* نسبت تصویر حفظ میشه */
  margin: 0;
}
.searchIcon .search img{
  height: 25px;   /* هر اندازه‌ای که می‌خوای */
  width: auto;    /* نسبت تصویر حفظ میشه */
}
.searchIcon .cartButton:hover{
  background-color: rgb(255, 255, 255);
}
.searchIcon .search:hover{
  background-color: rgb(255, 255, 255);
}
.searchIcon input{
  padding: 0.2rem;
  width: 8rem;
  border: none;
  border-radius: 0.7rem;
  margin: 1px;
}
/* همبرگر */
.hamburger {
  display: none;
  font-size: 28px;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
}
@media (max-width: 950px) {
  .hamburger {
    display: block;
    order: 0; /* سمت راست */
  }
  .searchIcon{
    order: 3;
    display: flex;
    justify-content: flex-end;
  }
  .searchIcon .search{
    display: none;
  }
  .searchIcon .cart{
    margin: 0;
  }
  .searchIcon .cartButton{
    margin-left: 0;
    margin-right: 0;
  }
  .brand {
    order: 2; /* سمت چپ */
  }
  nav {
    position: fixed;
    top: 120px;
    left: 0;
    right: 0;
    background: black;
    display: none;
    flex-direction: column;
  }
  nav.active {
    display: flex;
  }
  nav ul.nav-links {
    flex-direction: column;
  }
  nav ul.nav-links li ul {
    position: static;
  }
  nav ul.nav-links li ul li ul {
    position: static;
  }

}

@media (max-width:1100px){
  nav ul.nav-links li > ul > li > ul > li > ul{
  list-style: none;
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: black;
  min-width: 160px;
  z-index: 1000;
}
nav ul.nav-links li > ul > li > ul > li:hover > ul{
  display: block;
}
}

.container {
  min-height: 70vh;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* سه ستون در صفحه بزرگ */
  gap: 15px;
  margin-top: 5rem;
  padding: 0.2rem;
}
@media (max-width: 1024px) {
  .container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }
}
.category-page{
  margin-top: 6rem;
  text-align: center;
}
.category {
  display: flex;
  flex-direction: column;
  background-color: whitesmoke;
  text-align: center;
  border: none;
  border-radius: 1rem;
  color: rgb(73, 73, 73);
  overflow: hidden; /* برای حفظ border-radius روی تصویر */
  min-height: 350px;
}

.category img {
  width: 100%;
  height: 200px; /* ارتفاع ثابت برای تصاویر */
  object-fit: contain; /* تصویر را بدون کش آمدن پر می‌کند */
}

.category h2 {
  color: rgb(92, 91, 91);
  padding: 1rem 0.5rem;
  margin: 0;
  font-size: medium;
}

.category hr {
  margin: 0.5rem 2rem;
  border: 1px solid #ddd;
}

.category .btn {
  margin: 1rem auto;
  width: 40%;
  max-width: 200px;
  background-color: rgb(96, 227, 227);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  padding: 0.3rem;
  cursor: pointer;
  transition: background-color 0.3s;
  text-decoration: none;
  font-size: small;
}
.category .btn:hover {
  background-color: rgb(236, 233, 233);
}
.category-description{
  margin-bottom: 3rem;
  margin-top: 2rem;
}
/* استایل برای دکمه فلش موبایل */
.mobile-arrow {
  display: none;
}

@media (max-width: 950px) {
  .mobile-arrow {
    display: inline-block;
    background: none;
    border: none;
    color: white;
    font-size: 12px;
    cursor: pointer;
    padding: 0 8px;
    margin-right: 5px;
  }
  
  /* چیدمان آیتم محصولات در موبایل */
  .nav-links > li:nth-child(2) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  
  .nav-links > li:nth-child(2) > a {
    flex: 1;
  }
  
  /* مخفی کردن همه زیرمنوها در موبایل */
  .nav-links li > ul {
    display: none !important;
    width: 100%;
    order: 3;
  }
  
  /* فقط نمایش زیرمنوی مستقیم محصولات (ست روتختی، بالش، تشک) */
  .nav-links > li.mobile-open > ul {
    display: block !important;
    width: 100%;
    padding-right: 20px;
    background: rgba(255, 255, 255, 0.05);
    margin-top: 5px;
    border-radius: 5px;
    position: static !important;
  }
  
  /* مخفی کردن زیرمنوهای عمیق‌تر (سطح سوم به بعد) */
  .nav-links li ul li > ul,
  .nav-links li ul li ul li > ul,
  .nav-links li ul li ul li ul li > ul {
    display: none !important;
    position: static !important;
  }
  
  /* استایل آیتم‌های سطح دوم */
  .nav-links li ul li {
    border-bottom: 1px solid #333;
  }
  
  .nav-links li ul li:last-child {
    border-bottom: none;
  }
  
  .nav-links li ul li a {
    padding: 10px 15px !important;
    font-size: 0.95em;
    color: #ddd;
    display: block;
  }
  
  /* بازگرداندن hover effect برای دسکتاپ */
  @media (min-width: 951px) {
    .nav-links li:hover > ul {
      display: block !important;
    }
    
    .nav-links li.mobile-open > ul {
      display: none !important;
    }
  }
  
  /* همبرگر */
  .hamburger {
    display: block;
    order: 0; /* سمت راست */
  }
  
  .searchIcon {
    order: 3;
    display: flex;
    justify-content: flex-end;
  }
  
  .searchIcon .search {
    display: none;
  }
  
  .searchIcon .cart {
    margin: 0;
  }
  
  .searchIcon .cartButton {
    margin-left: 0;
    margin-right: 0;
  }
  
  .brand {
    order: 2; /* سمت چپ */
  }
  
  nav {
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    background: black;
    display: none;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    padding: 10px 0;
    z-index: 999;
  }
  
  nav.active {
    display: block;
  }
  
  nav ul.nav-links {
    flex-direction: column;
  }
  
  nav ul.nav-links li {
    border-bottom: 1px solid #333;
  }
  
  nav ul.nav-links li:last-child {
    border-bottom: none;
  }
  
  /* غیرفعال کردن hover effects در موبایل */
  .nav-links li .menue:hover::after {
    width: 0;
  }
}

/* Media query برای تبلت‌ها */
@media (min-width: 768px) and (max-width: 950px) {
  nav {
    width: 300px;
    left: auto;
    right: 0;
  }
}
/* بخش فوتر */
footer {
  background: black;
  color: #fff;
  text-align: center;
  padding: 20px;
}