/* TPM Article Detail v1.0
   Extends the production product-detail design instead of creating a second
   visual system. Product CSS remains the source of truth for shell/nav/ribbons,
   CMS typography, related cards and comments. */

.tpm-article-page .tpm-article-overview-media .ProductImageBox {
  position: relative;
  overflow: hidden !important;
  background: #f4f7f9 !important;
}

.tpm-article-page .tpm-article-overview-media .HeightPic {
  object-fit: cover !important;
  object-position: center !important;
}

.tpm-article-page .tpm-article-image-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: flex-end;
  flex-direction: column;
  gap: 8px;
  padding: 34px;
  direction: rtl;
  background:
    linear-gradient(135deg, rgba(13,17,59,.98), rgba(13,54,88,.93)),
    url('/administrator/files/UploadFile/tavanpmbg.jpg') center / cover no-repeat;
  color: #fff;
}

.tpm-article-page .tpm-article-overview-media.is-no-image .tpm-article-image-fallback {
  display: flex;
}

.tpm-article-page .tpm-article-overview-media.is-no-image .ProductImageBox {
  border: 0 !important;
}

.tpm-article-page .tpm-article-image-fallback span {
  color: #00d8ef;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 2px;
}

.tpm-article-page .tpm-article-image-fallback strong {
  max-width: 260px;
  font-size: 19px;
  line-height: 1.8;
}

.tpm-article-page .tpm-article-hero-footer {
  width: min(100%, 470px);
  margin-top: 24px;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,.16);
}

.tpm-article-page .tpm-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 12px;
  margin: 0;
  color: #c8cada;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.7;
}

.tpm-article-page .tpm-article-meta__date,
.tpm-article-page .tpm-article-meta__comments {
  display: inline-flex !important;
  align-items: center;
  min-height: 30px;
  margin: 0 !important;
  padding: 5px 9px !important;
  border: 1px solid rgba(255,255,255,.13) !important;
  border-radius: 2px !important;
  background: rgba(255,255,255,.055) !important;
  box-shadow: none !important;
  color: #d9dbea !important;
  font-family: "IRANYekan", "IRANSans", Tahoma, sans-serif !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  line-height: 1.6 !important;
  text-decoration: none !important;
  white-space: normal;
}

.tpm-article-page .tpm-article-meta__date {
  gap: 7px;
  max-width: 290px;
}

.tpm-article-page .tpm-article-meta__date-text {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.tpm-article-page .tpm-article-meta__icon {
  position: relative;
  display: inline-block;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  color: #00d8ef;
}

.tpm-article-page .tpm-article-meta__icon--calendar::before {
  content: "";
  position: absolute;
  inset: 2px 1px 1px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.tpm-article-page .tpm-article-meta__icon--calendar::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 3px;
  left: 3px;
  border-top: 1.5px solid currentColor;
  box-shadow: 3px -4px 0 -2px currentColor, -3px -4px 0 -2px currentColor;
}

.tpm-article-page .tpm-article-meta__comments::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 11px;
  margin-left: 7px;
  border: 1.5px solid #00d8ef;
  border-radius: 2px;
  clip-path: polygon(0 0,100% 0,100% 76%,42% 76%,28% 100%,28% 76%,0 76%);
}

.tpm-article-page .tpm-article-meta__comments:hover,
.tpm-article-page .tpm-article-meta__comments:focus-visible {
  border-color: rgba(0,216,239,.65) !important;
  background: rgba(0,216,239,.10) !important;
  color: #fff !important;
  outline: 0;
}

.tpm-article-page .tpm-article-meta__back {
  display: inline-flex !important;
  align-items: center;
  width: max-content;
  min-height: 32px;
  margin: 10px 0 0 !important;
  padding: 6px 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #fff !important;
  font-family: "IRANYekan", "IRANSans", Tahoma, sans-serif !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.6 !important;
  text-decoration: none !important;
}

.tpm-article-page .tpm-article-meta__back::after {
  content: "←";
  margin-right: 8px;
  color: #00d8ef;
  font-family: Arial, sans-serif;
  font-size: 15px;
  line-height: 1;
  transition: transform .18s ease;
}

.tpm-article-page .tpm-article-meta__back:hover,
.tpm-article-page .tpm-article-meta__back:focus-visible {
  color: #00d8ef !important;
  outline: 0;
}

.tpm-article-page .tpm-article-meta__back:hover::after,
.tpm-article-page .tpm-article-meta__back:focus-visible::after {
  transform: translateX(-3px);
}

.tpm-article-page .tpm-product-overview-title {
  max-width: 470px;
}

.tpm-article-page .tpm-product-overview-summary,
.tpm-article-page .tpm-product-overview-summary p {
  max-width: 455px;
}

.tpm-article-page .tpm-article-cms {
  font-size: 14px;
}

/* Article H2s become the same purple-side ribbons seen on product sections.
   We keep the original heading nodes and hierarchy intact for SEO. */
.tpm-article-page .tpm-article-cms h2.tpm-article-section-heading {
  width: 100% !important;
  margin: 42px 0 18px !important;
  padding: 14px 18px !important;
  color: #111936 !important;
  background: #f0eaf4 !important;
  border: 0 !important;
  border-right: 4px solid #6f2b91 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  line-height: 1.65 !important;
  text-align: right !important;
  scroll-margin-top: 105px;
}

.tpm-article-page .tpm-article-cms h2.tpm-article-section-heading::before {
  display: none !important;
  content: none !important;
}

.tpm-article-page .tpm-article-cms h2.tpm-article-section-heading:first-child {
  margin-top: 10px !important;
}

.tpm-article-page .tpm-article-cms h3,
.tpm-article-page .tpm-article-cms h4 {
  scroll-margin-top: 105px;
}

.tpm-article-page .tpm-article-cms figure {
  max-width: 100%;
  margin: 26px auto;
}

.tpm-article-page .tpm-article-cms figcaption {
  margin-top: 8px;
  color: #747d89;
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
}

.tpm-article-page .tpm-article-cms blockquote {
  margin: 24px 0;
  padding: 18px 20px;
  background: #f5f8fa;
  border-right: 4px solid #4ea39c;
  color: #303647;
}

.tpm-article-page .tpm-article-related[hidden] {
  display: none !important;
}

.tpm-article-page .tpm-article-related {
  clear: both;
  width: 100%;
}

.tpm-article-page .tpm-article-dynamic-source {
  clear: both;
  width: 100%;
}

/* ArticleDetail's legacy DLL injects ArticleShow after CommentPost. It is now
   a data source for related cards, not a second full catalog inside the page. */
.tpm-article-page .tpm-article-dynamic-source > .tpm-catarticle-page,
.tpm-article-page .tpm-article-dynamic-source .tpm-catarticle-page,
.tpm-article-page [data-tpm-article-dynamic-source] [data-tpm-article-catalog] {
  display: none !important;
}

.tpm-article-page .tpm-related-media {
  background: #fff;
}

.tpm-article-page .tpm-product-related .tpm-related-card .Image {
  object-fit: cover !important;
  object-position: center !important;
}

.tpm-article-page .tpm-article-related .tpm-related-card h3 {
  min-height: 52px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}

.tpm-article-page .tpm-article-related .tpm-related-card h3::after {
  content: "←";
  flex: none;
  margin-right: 8px;
}

.tpm-article-page .tpm-product-nav .Item {
  white-space: nowrap;
}

.tpm-article-page .tpm-product-nav .Item[data-tpm-article-generated="true"] {
  min-width: max-content;
}

.tpm-article-page .tpm-article-content-section {
  scroll-margin-top: 95px;
}

.tpm-article-page .BoxCommentUser,
.tpm-article-page .CommentFaceBook {
  scroll-margin-top: 100px;
}

@media (max-width: 850px) {
  .tpm-article-page .tpm-product-overview-media .HeightPic {
    object-fit: cover !important;
  }

  .tpm-article-page .tpm-article-hero-footer {
    width: 100%;
    margin-top: 20px;
    padding-top: 14px;
  }

  .tpm-article-page .tpm-article-meta {
    gap: 7px;
  }

  .tpm-article-page .tpm-article-meta__date,
  .tpm-article-page .tpm-article-meta__comments {
    font-size: 10px !important;
  }

  .tpm-article-page .tpm-article-cms h2.tpm-article-section-heading {
    margin-top: 30px !important;
    padding: 12px 14px !important;
    font-size: 17px !important;
    scroll-margin-top: 82px;
  }
}

@media (max-width: 520px) {
  .tpm-article-page .tpm-article-image-fallback {
    padding: 22px;
  }

  .tpm-article-page .tpm-article-image-fallback span {
    font-size: 28px;
  }

  .tpm-article-page .tpm-article-image-fallback strong {
    font-size: 16px;
  }
}

/* Tables authored inside article HTML get the same technical-table treatment. */
.tpm-article-page .tpm-article-table-scroll {
  width: 100%;
  margin: 22px 0 28px;
  overflow-x: auto;
  border: 1px solid #d6dfe4;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.tpm-article-page .tpm-article-table-scroll table {
  width: 100% !important;
  min-width: 640px;
  margin: 0 !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
}

.tpm-article-page .tpm-article-table-scroll th,
.tpm-article-page .tpm-article-table-scroll td {
  padding: 12px 14px !important;
  border: 1px solid #dbe4e7 !important;
  line-height: 1.8 !important;
  vertical-align: middle !important;
}

.tpm-article-page .tpm-article-table-scroll th {
  color: #fff !important;
  background: #4ea39c !important;
  font-weight: 800 !important;
}

.tpm-article-page .tpm-article-table-scroll tr:nth-child(even) td {
  background: #f4f9f9 !important;
}

@media (max-width: 850px) {
  .tpm-article-page .tpm-article-table-scroll table {
    min-width: 560px;
  }
}

@media (max-width: 850px) {
  /* Long articles may have many H2s. Keep the mobile bottom dock identical in
     density to ProductDetail; section-level H2 navigation remains desktop-only. */
  .tpm-article-page .OrderRepairStep .Item[data-tpm-article-heading-nav="true"] {
    display: none !important;
  }
}
/* v1.1: force the Persian site font through generated/legacy article nodes too. */
.tpm-article-page,
.tpm-article-page button,
.tpm-article-page input,
.tpm-article-page textarea,
.tpm-article-page select,
.tpm-article-page .tpm-article-cms,
.tpm-article-page .tpm-article-cms * {
  font-family: "IRANYekan", "IRANSans", Tahoma, sans-serif !important;
}

