/* =====================================================
   LME Desc - تایپوگرافی استاندارد فارسی برای توضیحات محصول
   ===================================================== */

/* فونت جایگزین (Vazirmatn، رایگان و همراه افزونه) */
@font-face {
  font-family: 'Vazirmatn';
  src: url('fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- متغیرها ---------- */
body .lme-desc {
  --lme-gold: #c9972b;
  --lme-gold-text: #8a6512;
  --lme-ink: #262626;
  --lme-muted: #5f5f5f;
  --lme-line: #e9e2d3;
  --lme-soft: #faf6ee;
}

/* ---------- کادر اصلی ---------- */
body .lme-desc {
  max-width: 780px;
  margin: 0 auto 40px;
  padding: 40px 44px;
  background: #fff;
  border: 1px solid var(--lme-line);
  border-radius: 16px;
  direction: rtl;
  text-align: right;
  color: var(--lme-ink);
  font-size: 17px;
  line-height: 2.1;
  letter-spacing: 0;
  word-spacing: 0;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  hyphens: manual;
}

body .lme-desc,
body .lme-desc * {
  font-family: 'IRANYekan', 'Vazirmatn', Tahoma, sans-serif !important;
  box-sizing: border-box;
}

/* ---------- پاراگراف‌ها ---------- */
body .lme-desc p {
  margin: 0 0 22px;
  text-align: justify;
  text-justify: inter-word;
  text-align-last: right;
  text-wrap: pretty;
  orphans: 3;
  widows: 3;
}

/* ---------- پاسخ کوتاه (AIO) ---------- */
body .lme-desc .lme-answer {
  margin: 0 0 36px;
  padding: 24px 28px;
  background: #fff8ee;
  border: 1px solid #efdfb8;
  border-right: 4px solid var(--lme-gold);
  border-radius: 12px;
  font-size: 17px;
  line-height: 2.15;
  text-align: justify;
  text-justify: inter-word;
  text-align-last: right;
  text-wrap: pretty;
}
body .lme-desc .lme-answer strong { color: var(--lme-gold-text); }

/* ---------- تیترها ---------- */
body .lme-desc h2 {
  margin: 48px 0 18px;
  padding: 0 14px 0 0;
  border: 0;
  border-right: 4px solid var(--lme-gold);
  background: none;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.7;
  color: #1c1c1c;
  text-align: right;
  text-wrap: balance;
}
body .lme-desc h3 {
  margin: 0 0 12px;
  padding: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.8;
  color: #1c1c1c;
  text-align: right;
  text-wrap: balance;
}

/* ---------- لینک‌ها ---------- */
body .lme-desc a {
  color: var(--lme-gold-text);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
body .lme-desc a:hover { color: #5f4309; }
body .lme-desc a:focus-visible,
body .lme-desc summary:focus-visible {
  outline: 2px solid var(--lme-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- در یک نگاه ---------- */
body .lme-desc .lme-glance {
  list-style: none !important;
  margin: 0 0 36px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
body .lme-desc .lme-glance li {
  margin: 0;
  padding: 16px 20px;
  list-style: none !important;
  background: var(--lme-soft);
  border: 1px solid var(--lme-line);
  border-radius: 10px;
  font-size: 16px;
  line-height: 2;
  text-align: right;
}
body .lme-desc .lme-glance li b {
  display: block;
  margin-bottom: 2px;
  color: var(--lme-gold-text);
  font-weight: 700;
}

/* ---------- مناسب / نامناسب ---------- */
body .lme-desc .lme-fit {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 30px 0 36px;
}
body .lme-desc .lme-fit-yes,
body .lme-desc .lme-fit-no {
  padding: 22px 24px;
  border-radius: 12px;
}
body .lme-desc .lme-fit-yes { background: #f2f8ef; border: 1px solid #d3e6cb; }
body .lme-desc .lme-fit-no  { background: #fdf4f0; border: 1px solid #f1d8cd; }
body .lme-desc .lme-fit ul {
  margin: 0;
  padding: 0 22px 0 0;
  list-style: disc outside;
}
body .lme-desc .lme-fit li {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 2;
  text-align: right;
}
body .lme-desc .lme-fit li:last-child { margin-bottom: 0; }

/* ---------- جدول ---------- */
body .lme-desc .lme-table {
  width: 100%;
  margin: 0 0 32px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--lme-line);
  border-radius: 10px;
  overflow: hidden;
  font-size: 16px;
}
body .lme-desc .lme-table th,
body .lme-desc .lme-table td {
  padding: 14px 18px;
  text-align: right;
  vertical-align: top;
  line-height: 2;
  border-bottom: 1px solid var(--lme-line);
}
body .lme-desc .lme-table tr:last-child th,
body .lme-desc .lme-table tr:last-child td { border-bottom: 0; }
body .lme-desc .lme-table th {
  width: 34%;
  background: var(--lme-soft);
  font-weight: 700;
  border-left: 1px solid var(--lme-line);
}

/* ---------- لینک‌های داخلی و منبع ---------- */
body .lme-desc .lme-links {
  margin: 0 0 32px;
  padding: 14px 20px;
  background: var(--lme-soft);
  border: 1px solid var(--lme-line);
  border-radius: 10px;
  font-size: 16px;
  text-align: right;
  text-align-last: right;
}
body .lme-desc .lme-source {
  margin: 36px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--lme-line);
  font-size: 14.5px;
  color: var(--lme-muted);
  text-align: right;
  text-align-last: right;
}

/* ---------- سوالات متداول ---------- */
body .lme-desc .lme-faq details {
  margin: 0 0 12px;
  background: #fff;
  border: 1px solid var(--lme-line);
  border-radius: 10px;
  overflow: hidden;
}
body .lme-desc .lme-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 12px 22px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  line-height: 1.9;
}
body .lme-desc .lme-faq summary::-webkit-details-marker { display: none; }
body .lme-desc .lme-faq summary::after {
  content: '+';
  flex: none;
  font-size: 22px;
  line-height: 1;
  color: var(--lme-gold);
}
body .lme-desc .lme-faq details[open] summary { background: var(--lme-soft); }
body .lme-desc .lme-faq details[open] summary::after { content: '\2212'; }
body .lme-desc .lme-faq details p {
  margin: 0;
  padding: 14px 22px 18px;
}

/* ---------- تبلت ---------- */
@media (max-width: 900px) {
  body .lme-desc {
    margin-left: 12px;
    margin-right: 12px;
    padding: 32px 28px;
  }
}

/* ---------- موبایل ---------- */
@media (max-width: 600px) {
  body .lme-desc {
    margin: 0 0 28px;
    padding: 24px 18px;
    border-radius: 12px;
    font-size: 16px;
    line-height: 2.05;
  }
  body .lme-desc .lme-answer { padding: 18px 20px; font-size: 16px; }
  body .lme-desc h2 { margin: 36px 0 14px; font-size: 19px; }
  body .lme-desc .lme-glance,
  body .lme-desc .lme-fit { grid-template-columns: 1fr; }
  body .lme-desc .lme-fit-yes,
  body .lme-desc .lme-fit-no { padding: 18px 20px; }

  body .lme-desc .lme-table,
  body .lme-desc .lme-table tbody,
  body .lme-desc .lme-table tr,
  body .lme-desc .lme-table th,
  body .lme-desc .lme-table td { display: block; width: 100%; }
  body .lme-desc .lme-table th {
    padding: 10px 16px 2px;
    border-left: 0;
    border-bottom: 0;
    font-size: 14.5px;
    color: var(--lme-gold-text);
  }
  body .lme-desc .lme-table td { padding: 0 16px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  body .lme-desc * { transition: none !important; animation: none !important; }
}
