.product-container {
  max-width: 1300px;
  margin: 20px auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
}

.top-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* تراز کردن آیتم‌ها از بالا */
  gap: 30px;
  margin-bottom: 30px;
}

/* کارت قیمت */
.price-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  min-width: 200px; /* استفاده از min-width به جای width */
  text-align: center;
  background: #f2f2f2;
  flex-shrink: 0; /* جلوگیری از کوچک شدن کارت قیمت */
}

.price {
  font-weight: bold;
  margin-bottom: 15px;
}

.quantity-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 15px;
}

.quantity-selector input {
  width: 40px;
  text-align: center;
  border: none;
  outline: none;
}

.quantity-selector button {
    width:100%;
  background: none;
  border: none;
  padding: 5px 10px;

  cursor: pointer;
}

.add-to-cart {
  background-color: #2b5288;
  color: white;
  border: none;
  padding: 10px;
  width: 100%;
  border-radius: 4px;
  cursor: pointer;
}

.product-info {
 direction: rtl;
  text-align: right;
  width: 360px;
  min-width: 300px;
  padding-top: 8px;
}
.product-info h2 {
  font-weight: 400;
}
.eng-title {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 20px;
}
.detail-row {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
  padding: 5px 0;
}

.product-image img {
  width: 100%; /* تصویر کل عرض کانتینر خودش را پر کند */
  height: 100%;
  object-fit: contain; /* حفظ تناسب تصویر بدون دفرمه شدن */
  border-radius: 8px;
}

.tabs-container {
  width: calc(100% - 200px);
  max-width: 1280px;
   margin: 30px auto;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
}

.tabs-header {
  display: flex;
  background: #eee;
  direction: rtl;
}

.tab-item {
  padding: 10px 20px;
  cursor: pointer;
  border-left: 1px solid #ddd;
}

.tab-item.active {
  background: white;
  font-weight: bold;
}

.tab-content {
  display: none;
  padding: 20px;
  text-align: right;
}

.tab-content.show {
  display: block;
  direction: rtl;
}
.product-image {
  flex: 1; /* اختصاص فضای مساوی با متن به تصویر */
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff; /* اگر تصویر شفاف است */
}
.related-products-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  direction: rtl;
}

.related-header {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
}

.related-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #565656;
  margin: 0;
}

.view-all {
  color: #868686;
  text-decoration: none;
  background-color: white;
  border: 1px solid #868686;
  font-size: 0.9rem;
}

.products-grid {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding: 20px;
  background-color: #e6e6e6;
  border-radius: 15px;
}

.product-card {
  background: #fff;
  border-radius: 12px;
  min-width: 200px;
  flex: 0 0 auto;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.card-image {
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

.card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.card-name {
  font-size: 0.95rem;
  margin: 5px 0;
  color: #333;
}

.card-eng {
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 10px;
}

.card-details {
  border-top: 1px solid #f0f0f0;
  padding-top: 8px;
  margin-bottom: 10px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 3px;
}

.card-price {
  font-weight: bold;

  color: #a0a0a0;
  font-size: 0.9rem;
  text-align: right;
}

.products-grid::-webkit-scrollbar {
  display: none;
}
@media (max-width: 500px) {
  .top-section {
    display: flex;
    flex-direction: column-reverse;
  }
  .price-card {
    width: 100%;
  }
  
}
.product-layout {
 width: calc(100% - 80px);
  max-width: 1280px;
  margin: 30px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  direction: ltr;
  box-sizing: border-box;
}

/* ---------------- sellers panel ---------------- */
.sellers-panel {
   direction: rtl;
  border: 1px solid #59aee8;
  border-top: none;
  background: #fff;
  position: relative;
  width: 320px;
  min-width: 320px;
  border-radius: 0 0 16px 16px;
  overflow: hidden;
}

.sellers-header {
  background: #244f86;
  color: #fff;
  border-radius: 0 0 34px 34px;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  margin-top: -1px;
}

.header-right,
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-title {
  font-size: 20px;
  font-weight: 700;
}

.store-icon {
  font-size: 28px;
}

.header-left {
  font-size: 16px;
  font-weight: 700;
}

.sellers-list {
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sellers-list.scrollable {
   max-height: 280px; /* مناسب برای 2 کارت */
  overflow-y: auto;
  overflow-x: hidden;
  padding-left: 8px;
}

.sellers-list.scrollable::-webkit-scrollbar {
  width: 8px;
}

.sellers-list.scrollable::-webkit-scrollbar-thumb {
  background: #c6d3e0;
  border-radius: 20px;
}

.seller-card {
  border: 2px solid #e4e4e4;
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  height:130px;
}

.seller-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.seller-brand {
  font-size: 18px;
  font-weight: 600;
  color: #444;
}

.seller-logo {
  min-width: 74px;
  height: 34px;
  border: 2px solid #d7dce2;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2f69b1;
  font-size: 16px;
  background: #fff;
}

.seller-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  margin-bottom: 4px;
  color: #555;
}

.price-label {
  font-size: 16px;
}

.price-value {
  font-size: 18px;
  font-weight: 500;
}

.seller-stock {
  font-size: 14px;
  color: #ff3b30;
  font-weight: 600;
  margin-bottom: 12px;
}
.finallEdit{
    display:flex;
    flex-direction:row;
    justify-content: space-between;
}
.seller-action {
  display: flex;
  align-items: center;
}

.select-btn {
  min-width: 96px;
  height: 42px;
  border: none;
  border-radius: 9px;
  background: #b4c1d5;
  color: #2f5a93;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.select-btn:hover {
  background: #a6b6ce;
}

.qty-box {
  width: 96px;
  height: 42px;
  border-radius: 9px;
  background: #b4c1d5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.qty-btn {
  border: none;
  background: transparent;
  color: #2f5a93;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
}

.qty-value {
  min-width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  font-size: 16px;
  font-weight: 700;
}

.hidden {
  display: none;
}

.add-to-cart-btn {
  width: calc(100% - 28px);
  margin: 8px 14px 14px;
  height: 60px;
  border: none;
  border-radius: 10px;
  background: #2f5a93;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.add-to-cart-btn:hover:not(:disabled) {
  opacity: 0.92;
}

.add-to-cart-btn:disabled {
  background: #9cb0cb;
  cursor: not-allowed;
}

/* ---------------- product info ---------------- */
.product-info {
    width:30%;
  direction: rtl;
  text-align: center;
  padding-top: 8px;
}

.product-title-fa {
   margin: 0 0 10px;
  font-size: 28px;
  font-weight: 700;
  color: #244f86;
  line-height: 1.8;
}

.product-title-en {
  margin: 0 0 22px;
  font-size: 18px;
  font-weight: 500;
  color: #666;
  line-height: 1.8;
}

.product-info hr {
  border: none;
  border-top: 1px solid #dcdcdc;
  margin: 18px 0 24px;
}

.info-block h3 {
  font-size: 18px;
  color: #244f86;
  margin: 0 0 22px;
  font-weight: 700;
  text-align: right;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 16px;
  font-size: 16px;
  gap: 20px;
}

.info-row span {
  color: #333;
  font-weight: 600;

}

.info-row strong {
  color: #777;
  font-weight: 400;
}

.info-block p {
  font-size: 15px;
  line-height: 2.2;
  color: #666;
  margin: 0;
  text-align: right;
}
.info-row span,
.info-row strong {
  font-size: 16px;
  line-height: 1.8;
}

/* ---------------- product image ---------------- */
.product-image-box {
 flex: 1;
  min-width: 280px;
  max-width: 460px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 10px;
}
.product-image-box img{
 width: 70%;
  /*max-width: 420px;*/
  height: 350px;
  /*max-height: 420px;*/
  object-fit: contain;
  border-radius: 22px;
  display: block;
}
.product-image {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.slider-dots span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #cfcfcf;
  
}

/* ---------------- responsive ---------------- */
@media (max-width: 1200px) {
  /*.product-layout {*/
  /*  grid-template-columns: 1fr;*/
  /*  direction: rtl;*/
  /*}*/

  .product-image-box {
    padding-top: 0;
  }

  .product-title-fa {
    font-size: 20px;
  }

  .product-title-en {
    font-size: 17px;
  }

  .info-row,
  .info-block p {
    font-size: 20px;
  }
}
@media (max-width: 500px){
    .product-layout{
      display:flex;
      flex-direction: column-reverse;
    width:100%;
     align-items: stretch;
  }
    .sellers-panel{
        width:100%;
        align-items: stretch;
        margin-bottom: 30px;
    }
}
.sellers-list {
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sellers-list.scrollable {
   max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-left: 8px;
}

.sellers-list.scrollable::-webkit-scrollbar {
  width: 8px;
}

.sellers-list.scrollable::-webkit-scrollbar-thumb {
  background: #c6d3e0;
  border-radius: 20px;
}