/* mahsoulat */

.available {
    color: green;
    font-weight: bold;
}
.unavailable {
    color: red;
}
/* استایل برای فیلتر رنگ در سایدبار */
.dropdown-container a:hover span {
    transform: scale(1.2);
    transition: transform 0.2s ease;
}
.mahsoulat{
  width: 100%;
  margin-top: 8px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}
.mright{
  width: 15%;
  border-radius: 10px;
  border: 1px solid rgb(210, 210, 210);
  margin: 0 20px;
  padding-bottom: 10px;
  overflow-y: visible;
  align-self: flex-start;
}
.mleft{
  width: 75%;
}

@media (max-width: 768px) {
  .mahsoulat{
  margin-top: 0;}

  .mright{
    display: none;
  }
  .mleft{
    width: 100%;
  }
}
.mright .dropdown-btn {
 padding: 6px 15px 6px 16px;
 margin-top: 5px;
 text-decoration: none;
 font-size: 18px;
 color: #818181;
 display: flex;
 border: none;
 background: none;
 width: 100%;
 text-align: right;
 cursor: pointer;
 outline: none;
 align-items: center;
}

.mright .titr{
 padding: 6px 15px 6px 16px;
 text-align: right;
 color: #515151;
 margin-bottom: 5px;
}

.mright hr{
 width: 80%;
 margin: 5px auto;
 color: #c6c4c4;
}

/* Estilos actualizados para el dropdown container */
.dropdown-container {
 display: none;
 padding: 10px 20px;
 background-color: #ffffff;
 max-height: 300px;
 overflow-y: auto;
}

/* Para categorías con muchos elementos */
.dropdown-container.multi-column {
 display: none;
 flex-wrap: wrap;
 column-count: 2;
 column-gap: 15px;
}

.dropdown-container a {
 display: block;
 margin: 8px 0;
 text-decoration: none;
 color: #333;
 padding: 5px 0;
 font-size: 14px;
 break-inside: avoid; /* Evita que los enlaces se dividan entre columnas */
}

.dropdown-container a:hover {
 color: #007bff;
}

.dropdown-container a.active {
 color: #007bff;
 font-weight: bold;
}

/* Estilo para scrollbar personalizado */
.dropdown-container::-webkit-scrollbar {
 width: 6px;
}

.dropdown-container::-webkit-scrollbar-track {
 background: #f1f1f1;
 border-radius: 10px;
}

.dropdown-container::-webkit-scrollbar-thumb {
 background: #888;
 border-radius: 10px;
}

.dropdown-container::-webkit-scrollbar-thumb:hover {
 background: #555;
}
.myBtnContainer{
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
  color: #818181;
}
.myBtnContainer p{
  margin: 0;
  padding: 5px;
  color: black;
}
.myBtnContainer .btn{
  color: #818181;
  background-color: transparent; 
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
}
.myBtnContainer .btn:hover {
  color: #6c6b6b;
}
.myBtnContainer .btn.active {
  color: #004e92;
}
.chfilter{
  display: none;
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none; 
  padding-bottom: 10px;
}

.chfilter::-webkit-scrollbar {
  display: none; 
}

@media (max-width: 768px) {
  .myBtnContainer{
    display: none;
  }
  .chfilter{
    display: flex;
    margin: 10px 10px 10px 10px;
  }
}

.dropbtn {
  background-color: #ffffff;
  color: rgb(0, 0, 0);
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid rgba(124, 124, 124, 0.397);
  border-radius: 20px;
  cursor: pointer;
  display: none;
  white-space: nowrap;
}
.dropbtn:hover, .dropbtn:focus {
  background-color: #edecec;
}
.dropdown {
  position: relative;
  display: inline-block;
  margin-right: 8px;
}

.dropdown-content {
  display: none;
  position: fixed; 
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 60vh; 
  border-radius: 20px 20px 0 0;
  background-color: #f1f1f1;
  z-index: 1000;
  transform: translateY(100%); 
  transition: transform 0.3s ease-in-out; 
  overflow-y: auto;
}
.close-dropdown {
  background-color: #f8f8f8;
  font-weight: bold;
  position: sticky;
  top: 0;
  border-bottom: 1px solid #ddd;
}
.dropdown-content a {
  color: black;
  padding: 15px 16px;
  text-decoration: none;
  display: block;
  font-size: 16px;
  text-align: center;
}
.dropdown-content a:hover {
  background-color: #ddd;
}
.show {
  display: block;
  transform: translateY(0); 
}

/* نمایش دکمه فقط در اندازه موبایل */
@media screen and (max-width: 768px) {
  .dropbtn {
    display: block;
    position: relative;
    z-index: 999;
    width: auto;
    min-width: 80px;
    height: 32px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 12px;
  }
  
  .dropdown {
    flex: 0 0 auto;
  }
  
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
  }
  
  .overlay.show {
    display: block;
  }
}

.mleft {
  margin-top: -10px;
  width: 80%;
  min-width: 0; 
}

@media (max-width: 768px) {
  .mleft {
    width: 100%;
  }
}

.product-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* حالا 4 کارت در ردیف */
  margin-top: 20px;
  width: 100%;
  padding: 0 10px;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
   
}

.card-contentt {
  background: #f8f9fa;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.3s ease;
  border: 1px solid rgba(229, 229, 229, 0.808);
}

.card-contentt:hover {
  /* transform: translateY(-5px); */
  box-shadow: 0 0 3px rgba(21, 21, 21, 0.3);
}

.product-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
}

.sale-badge {
  background: #4ade80;
}

.pro-img {
  position: relative;
  overflow: hidden;
}

.card-image-container {
  width: 100%;
  height: 280px; /* کمی کوچکتر */
  overflow: hidden;
  background: #f8f9fa;
}

.card-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pro-content {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.product-name {
  font-size: 18px; /* کمی کوچکتر */
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  line-height: 1.3;
}

.product-description {
  font-size: 13px; /* کمی کوچکتر */
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
  flex-grow: 1;
}

/* پالت رنگی */
.color-options {
  display: flex;
  gap: 6px;
  margin: 8px 0;
}

.color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 3px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.color-dot:hover {
  transform: scale(1.1);
}

.product-price-section {
  height: 57px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px; /* کمی کوچکتر */
}

/* قیمت با تخفیف */
.price-with-discount {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.original-price {
  font-size: 14px;
  color: #9ca3af;
  text-decoration: line-through;
  font-weight: 500;
}

.product-price {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.price-currency {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.buy-button {
  background: white;
  color: #1f2937;
  border: none;
  padding: 10px 20px; /* کمی کوچکتر */
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px; /* کمی کوچکتر */
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.buy-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
  font-size: 16px;
}

/* ریسپانسیو - تبلت بزرگ */
@media (max-width: 1200px) {
  .product-card {
    grid-template-columns: repeat(3, 1fr); /* 3 کارت */
  }
}

/* ریسپانسیو - تبلت */
@media (max-width: 900px) {
  .product-card {
    grid-template-columns: repeat(2, 1fr); /* 2 کارت */
  }
  
  .card-image-container {
    height: 240px;
  }
  
  .pro-content {
    padding: 18px;
  }
  
  .product-name {
    font-size: 16px;
  }
}

/* ریسپانسیو - موبایل 768px - کارت مستطیلی تمام صفحه */
@media (max-width: 768px) {
  .product-card {
    grid-template-columns: 1fr; /* 1 کارت تمام صفحه */
    padding: 0 16px;
  }
  
  .card-contentt {
    flex-direction: row;
    height: 180px;
  }
  
  .product-badge {
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 12px;
  }
  
  .pro-img {
    width: 160px;
    flex-shrink: 0;
  }
  
  .card-image-container {
    height: 100%;
  }
  
  .pro-content {
    padding: 20px;
    gap: 10px;
    flex: 1;
    justify-content: space-between;
  }
  
  .product-name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
  }
  
  .product-description {
    font-size: 13px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .color-options {
    margin: 6px 0;
  }
  
  .color-dot {
    width: 16px;
    height: 16px;
  }
   .product-price-section{
        gap: 0;
   }
  .product-price {
    font-size: 16px;
    margin-bottom: 5px;
  }
  
  .original-price {
    font-size: 12px;
  }
  
  .price-currency {
    font-size: 12px;
  }
  
  .buy-button {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 16px;
  }
}

