/* تنظیمات عمومی */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
  }
  
  body, html {
    background-color: #333;
    color: #333;
    direction: rtl;
    text-align: right;
    width: 100%;
    overflow-x: hidden;
  }
/* استایل هدر */
header {
    background-color: #181818;
    padding: 15px 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 2px solid gold;
  }
  
  /* کانتینر هدر */
  .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
  }
  
  /* قرار دادن لوگو در سمت راست */
  .logo {
    order: 1;
    text-align: right;
  }
  
  /* قرار دادن منو در وسط */
  nav {
    order: 2;
    flex-grow: 1;
    text-align: center;
}
  
  /* لوگو */
  .logo h1 {
    color: goldenrod;
    font-size: 1.8em;
    text-align: right;
    margin: 0;
  }
  
/* آیکون شبکه‌های اجتماعی */
.social-icons {
  display: flex;
  gap: 8px;
}

.social-icons img {
  width: 28px;
  height: 28px;
  transition: transform 0.3s;
}

.social-icons img:hover {
  transform: scale(1.2);
}
  /* عنوان محصولات */
  .header-h1 {
    text-align: center;
    color: white;
    font-size: 1.8em;
    margin-top: 10px;
  }
  
  .menu-icon {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    background: none;
    border: none;
    color: gold;
    cursor: pointer;
    transition: opacity 0.3s;
    display: none;
  }
  
  .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    color: gold;
    cursor: pointer;
    display: none; /* اول مخفی باشه */
  }
  
  .sidebar {
    position: fixed;
    top: 0;
    right: -250px;
    width: 250px;
    height: 100%;
    background: #222;
    padding-top: 60px;
    box-shadow: -3px 0 10px rgba(255, 215, 0, 0.3);
    transition: right 0.4s ease-in-out;
    text-align: right;
  }
  
  .sidebar ul {
    list-style: none;
    padding: 0;
  }
  
  .sidebar li {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
  }
  
  .sidebar a {
    color: gold;
    text-decoration: none;
    font-size: 18px;
    display: block;
    transition: 0.3s;
  }
  
  .sidebar a:hover {
    background: rgba(255, 215, 0, 0.1);
  }
  
  .closeSidebar {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    background: none;
    border: none;
    color: gold;
    cursor: pointer;
  }
  /* نمایش دکمه بستن هنگام باز بودن سایدبار */
.sidebar.open .close-btn {
    display: block;
  }
  
  /* نمایش و مخفی کردن دکمه‌های باز و بسته */
  .sidebar.open ~ .menu-icon {
    display: none;
  }
  
  /* ریسپانسیو برای موبایل */
  @media (max-width: 768px) {
    .menu-icon {
      display: block; /* دکمه منو در موبایل نمایش داده شود */
    }
    .header-container {
      flex-direction: column;
      text-align: center;
    }
    .logo h1 {
      font-size: 1.5em;
    }
    .header-line {
      position: absolute;
      top: 77px;
    }
    .social-icons {
      position: absolute;
      left: 5px;
      margin-bottom: 5px;
    }
  }

  .location {
    width: 100%;
    margin: 10px;
    padding: 10px;
  }
  .location a {
    text-decoration: none;
    opacity: 100%;
    color: white;
  }
  .location a:hover {
    color: gold;
  }
  main {
    position: relative;
    display: flex;
  }
  /* دکمه هوم */
  .fixed-home-btn {
    opacity: 60%;
    position: fixed;
    bottom: 50px;
    right: 50px;
    background: gold;
    color: black;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 9999;
  }

  .fixed-home-btn:hover {
      background: #b8860b;
  }

  /* باکس سرچ و کتگوری */
  .main {
    position: block;
    top: 20px;
    right: 20px;
    width: 280px;
    background: linear-gradient(135deg, #222, #444); /* گرادینت مشکی لوکس */
    border: 2px solid gold; /* حاشیه طلایی */
    box-shadow: -2px 0 10px rgba(255, 215, 0, 0.5);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .search-box {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    background-color: #333;
    color: gold;
    outline: none;
    text-align: center;
    font-weight: bold;
    transition: 0.3s;
  }
  .search-box:focus {
    background-color: black;
    border: 1px solid gold;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
  }
  .content {
    flex: 1;
    padding: 20px;
  }

  .item {
    list-style: none;
    font-size: 18px;
    padding: 5px 0;
  }
  .item li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    cursor: pointer;
  }
  .item a {
    color: gold;
    text-decoration: none;
    font-size: 16px;
    transition: 0.3s;
  }
  .item a:hover {
    color: white;
  }
  /* استایل چک‌باکس (مربع انتخابی) */
  .check-box {
    width: 18px;
    height: 18px;
    border: 2px solid gold;
    border-radius: 4px;
    display: inline-block;
    position: relative;
    transition: 0.3s;
  }

  /* وقتی انتخاب شد، تیک داخل مربع ظاهر بشه */
  .check-box.selected {
    background-color: gold;
    border-color: black;
  }

  /* اضافه کردن تیک داخل مربع */
  .check-box.selected::after {
    content: "✔";
    color: black;
    font-size: 14px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  @media (max-width: 768px) {
      .main {
        display: none;
      }
  }

  /* محصولات */
.product-container {
    width: 400px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.product-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.product-title {
    font-size: 22px;
    font-weight: bold;
    margin: 15px 0;
    color: #333;
}

.product-category {
    font-size: 14px;
    color: #777;
    margin-bottom: 10px;
}

.product-description {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
}
.products {
  width: 100%;
  display: flex;
  flex-wrap: wrap; /* نمایش چند ردیف در موبایل */
  justify-content: space-around;
  gap: 5px;
  text-align: center;
  margin-bottom: 10px;
}

.product {
  width: calc(20% - 5px);
  background-color: #f9f9f9;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.product a {
  text-decoration: none;
  display: inline-block;
  padding: 8px 12px;
  background-color: gold;
  color: #222;
  border-radius: 5px;
  font-size: 12px;
  transition: background-color 0.3s;
}

.product a:hover {
  background-color: #222;
  color: white;
}


/* در موبایل محصولات در دو ستون نمایش داده شوند */
@media (max-width: 768px) {
  .products {
    width: 100%;
  }
  .product {
    width: 30%; 
  }
}

/* در موبایل خیلی کوچک، محصولات در یک ستون نمایش داده شوند */
@media (max-width: 500px) {
  .products {
    /* flex-direction: column; */
    align-items: center;
  }
  
  .product {
    width: calc(50% - 20px); /* کارت‌ها عرض مناسب بگیرند */
    margin-bottom: 20px;
  }
}

  
.product img {
  width: 80%;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}
  
.product h3 {
  color: #222;
  font-size: 14px;
  margin: 10px 0;
}
 
.product:hover {
  background: linear-gradient(135deg, gold, #ffcc00);
  color: black;
  transform: scale(1.05);
  cursor: pointer;
}
  
/* استایل فوتر */
footer {
  background-color: #181818;
  color: white;
  padding: 40px 20px;
  margin-top: 10px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-column {
  width: 30%;
  padding: 10px;
  text-align: right;
}

.footer-column h3 {
  color: #FFD700;
  border-bottom: 2px solid #FFD700;
  padding-bottom: 5px;
}

.footer-column ul li a {
  opacity: 50%;
  margin-right: 10px;
  color: white;
  text-decoration: none;
}

.footer-column ul li a:hover {
  color: #FFD700;
}
.footer-column p {
  opacity: 50%;
}

a.phone {
  text-decoration: none;
  color: white;
}

a.phone:hover {
  color: #f1d04b;
}
.footer-container {
  display: flex;
  justify-content: space-between; /* فاصله‌ی مساوی بین بخش‌ها */
  align-items: flex-start; /* تراز عمودی */
  flex-wrap: wrap; /* اگر صفحه کوچک شد، اجزا بشکنند */
}

.footer-container form {
  width: 300px;
  text-align: right;
  direction: rtl ;
  margin-left: auto;
  margin-right: 0;
  display: block;
}

.footer-container form input,
.footer-container form textarea {
  width: 100%;
  margin-bottom: 10px;
  padding: 8px;
}

.footer-container form button {
  width: 100%;
  background-color: red;
  border-radius: 30px;
  color: black;
  padding: 10px;
  border: none;
  cursor: pointer;
}

.footer-container form button:hover {
  background-color: #FFD700; /* تغییر رنگ هنگام هاور */
  transition: 0.3s;
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
  }
  .footer-container h3 {
    border-bottom: 0;
  }

  .footer-column {
    width: 100%;
    margin-bottom: 20px;
    text-align: right;
  }

/* مدیا کوئری برای موبایل */
@media screen and (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: center;
  }
  .logo h1 {
    color: goldenrod;
    font-size: 1em;
    text-align: right
  }

  nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 1em;
    transition: color 0.3s;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
  }

  .footer-column h3 {
    opacity: 100%;
    border: 0;
    margin-bottom: 5px;
  }
  .footer-column {
    width: 100%;
    margin-bottom: 20px;
    text-align: right;
  }
}}