
        * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  line-height: 1.5;
  background: #fff;
  color: #333;
}

.product-page {
  display: flex;
  flex-direction: column;
  padding: 15px;
  gap: 20px;
}

/* تصویر محصول داخل product-info */
.product-info .main-image img {
  width: 60%;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* اطلاعات محصول */
.product-info {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
}
.product-title {
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.product-description {
  font-size: 1rem;
  margin-bottom: 15px;
}

/* مقالات مرتبط */
.related-articles {
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}
.related-articles h2 {
  margin-bottom: 12px;
}
.article-card {
  /* padding: 10px 0; */
  border-bottom: 1px solid #eee;
}
.article-card:last-child {
  border-bottom: none;
}

/* کارت محصول دسکتاپ */
.desktop-product-card {
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  margin-top: 15px;
  font-family: 'IRANSans'!important;
  display: none; /* پیش‌فرض موبایل پنهان */
}
.desktop-product-card .card-image {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 10px;
}
.desktop-product-card .card-description {
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.desktop-product-card .order-button {
  width: 100%;
  padding: 10px;
  background: #0073e6;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'IRANSans'!important;
}
.desktop-product-card .order-button:hover {
  background: #005bb5;
}

/* دکمه CTA موبایل */
.cta .order-button {
  width: 100%;
  padding: 25px;
  background: #0073e6;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  font-family: 'IRANSans'!important;
}
.cta .order-button:hover {
  background: #005bb5;
}

/* موبایل (<768px) */
@media (max-width: 767px) {
  .cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 15px;
    background: #fff;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    z-index: 100;
  }
}

/* تبلت (768px-1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .product-page {
    gap: 25px;
  }
  .product-title {
    font-size: 1.7rem;
  }
}

/* دسکتاپ (>=1024px) */
@media (min-width: 1024px) {
  .product-page {
    flex-direction: row;
    align-items: flex-start;
    gap: 30px;
        padding-left: 40px;
    padding-right: 50px;
  }
  .product-info {
    flex: 3;
  }
  .related-section {
    flex: 1;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
  }
  .related-articles {
    margin-bottom: 15px;
    overflow-y: auto;
    max-height: calc(100vh - 200px); /* جای کارت محصول */
  }
  .desktop-product-card {
    display: block; /* نمایش کارت محصول در دسکتاپ */
    position: sticky;
    bottom: 20px;
  }
  .cta {
    display: none; /* CTA موبایل مخفی در دسکتاپ */
  }
}



@media (max-width: 767.98px) {
  main.product-page img {
    display: block;         /* هر تصویر در خط جدید */
    width: 100% !important; /* همیشه حداکثر ۱۰۰٪ عرض */
    height: auto !important;/* حفظ نسبت تصویر */
    margin: 1rem 0;         /* فاصله استاندارد بالا/پایین */
    object-fit: contain;    /* حفظ نسبت در صورت container محدود */
    max-width: 100%;        /* جلوگیری از overflow */
  }
}

    .article-date-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin: 14px 0 22px;
  padding: 12px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  color: #64748b;
  font-size: 13px;
  line-height: 1.9;
}

.article-date-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  white-space: nowrap;
}

.article-date-meta__item::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #2563eb;
  flex: 0 0 auto;
}

.article-date-meta__item--updated::before {
  background: #16a34a;
}

.article-date-meta__label {
  color: #334155;
  font-weight: 600;
}

.article-date-meta__value {
  color: #64748b;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .article-date-meta {
    display: block;
    padding: 12px 14px;
    margin: 12px 0 18px;
    font-size: 12.5px;
  }

  .article-date-meta__item {
    display: flex;
    margin-bottom: 6px;
    white-space: normal;
  }

  .article-date-meta__item:last-child {
    margin-bottom: 0;
  }
}

    /* باکس لینک‌های مرتبط - استیکی سمت چپ مقاله */
.related-section {
  position: sticky;
  top: 96px;
  align-self: flex-start;
  width: 280px;
  /* max-width: 280px; */
  direction: rtl;
  z-index: 10;
}

/* کارت داخلی مقالات مرتبط */
.related-articles {
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

/* عنوان بخش، اگر داخل related-articles از h2 یا h3 استفاده شده باشد */
.related-articles h2,
.related-articles h3,
.related-articles .title,
.related-articles .section-title {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.7;
}

/* لیست لینک‌ها */
.related-articles ul,
.related-articles ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* آیتم‌های لیست */
.related-articles li {
  margin: 0;
  padding: 0;
}

/* لینک‌های مرتبط */
.related-articles a {
  display: block;
  position: relative;
  padding: 12px 16px 1px 1px;
  border-radius: 12px;
  color: #334155;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.8;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

/* نقطه کنار هر لینک */
.related-articles a::before {
  content: "";
  position: absolute;
  top: 20px;
  right: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
  opacity: 0.75;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

/* حالت هاور */
.related-articles a:hover,
.related-articles a:focus {
  background: #f1f5f9;
  color: #2563eb;
  transform: translateX(-2px);
  outline: none;
}

.related-articles a:hover::before,
.related-articles a:focus::before {
  opacity: 1;
  transform: scale(1.25);
}

/* جلوگیری از به‌هم‌ریختگی متن‌های طولانی */
.related-articles a {
  overflow-wrap: anywhere;
}

/* نسخه تبلت و موبایل: حذف حالت استیکی */
@media (max-width: 1024px) {
  .related-section {
    position: static;
    width: 100%;
    max-width: 100%;
    margin: 28px 0 0;
  }

  .related-articles {
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  }
}

/* موبایل کوچک */
@media (max-width: 640px) {
  .related-articles h2,
  .related-articles h3,
  .related-articles .title,
  .related-articles .section-title {
    font-size: 15px;
  }

  .related-articles a {
    padding: 9px 14px 9px 8px;
    font-size: 13px;
  }
}
