* {
  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;
}
/* استایل برای دکمه فلش موبایل */
.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;
  }
}
@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;
}}

/* محصول */
/* ===== Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: sans-serif;
  direction: rtl;
  background-color: #f7f7f7;
  color: #222;
}

/* ===== Product Detail Layout ===== */
.product-detail {
  max-width: 1200px;
  margin: 40px auto;
  margin-top: 65px;
  padding: 24px;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  border-radius: 8px;
}

/* ===== Gallery ===== */
.product-gallery .main-image {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.product-gallery .main-image img {
  width: 100%;
  display: block;
}

.thumbnail-images {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.thumbnail-images img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 6px;
  border: 2px solid transparent;
  transition: border 0.2s ease;
}

.thumbnail-images img:hover {
  border-color: #ccc;
}

/* ===== Product Info ===== */
.product-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-title {
  font-size: 24px;
  font-weight: bold;
}

.product-price {
  font-size: 20px;
  color: #0a7;
  font-weight: bold;
}

.product-description {
  line-height: 1.8;
  color: #555;
}

/* ===== Actions ===== */
.product-actions {
  margin-top: 16px;
}

.add-to-cart-btn {
  padding: 14px 28px;
  font-size: 16px;
  border: none;
  background: #cdd1cf;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.add-to-cart-btn:hover {
  background-color: rgb(165, 222, 210);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .product-detail {
    grid-template-columns: 1fr;
  }

  .thumbnail-images {
    justify-content: center;
  }
}
/* فوتر */
footer {
  background: black;
  color: #fff;
  text-align: center;
  padding: 20px;
}