<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>خرید دامنه spacescience.ir | نام «علوم فضایی» برای نجوم</title>
  <meta name="description" content="«علوم فضایی» مناسب نجوم است و می‌تواند برای انتشار اخبار اکتشافات فضایی به کار رود. این نشانی ایرانی برای فروش عرضه شده است؛ جهت مالکیت پیام دهید.">
  <meta property="og:title" content="خرید دامنه spacescience.ir | نام «علوم فضایی» برای نجوم">
  <meta property="og:description" content="«علوم فضایی» مناسب نجوم است و می‌تواند برای انتشار اخبار اکتشافات فضایی به کار رود. این نشانی ایرانی برای فروش عرضه شده است؛ جهت مالکیت پیام دهید.">
  <meta name="robots" content="index,follow">
  <link rel="icon" href="/favicon.svg" type="image/svg+xml">
  <style>
    @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;
    }
    @font-face {
      font-family: "Vazirmatn";
      src: url("/fonts/vazirmatn-extrabold.woff2") format("woff2");
      font-weight: 800;
      font-style: normal;
      font-display: swap;
    }

    :root {
      --paper: #eef3ef;
      --paper-deep: #e2ebe4;
      --ink: #14241c;
      --muted: #5d7267;
      --forest: #0f3b2c;
      --forest-soft: #1a5a42;
      --leaf: #1f8f5f;
      --line: rgba(20, 36, 28, .12);
      --card: #f7faf8;
      --ok: #1f8f5f;
      --bale: #2ecc71;
      --whatsapp: #25d366;
      --telegram: #2aabee;
      --sms: #5d7267;
      --phone: #2a7ab8;
      --shadow: 0 18px 50px rgba(15, 40, 28, .14);
    }

    * { box-sizing: border-box; }
    html { height: 100%; }
    body {
      margin: 0;
      min-height: 100%;
      min-height: 100dvh;
      font-family: "Vazirmatn", "Tahoma", "Segoe UI", sans-serif;
      color: var(--ink);
      background:
        linear-gradient(165deg, #f7faf8 0%, var(--paper) 48%, var(--paper-deep) 100%);
      display: flex;
      align-items: safe center;
      justify-content: safe center;
      padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    }

    .wrap { width: min(700px, 100%); text-align: center; }
    .card {
      background: var(--card);
      border: 1px solid var(--line);
      border-radius: 18px;
      padding: clamp(1.35rem, 4vw, 2rem);
      box-shadow: var(--shadow);
    }

    .badge {
      display: inline-flex;
      align-items: center;
      gap: .4rem;
      border: 1px solid rgba(31, 143, 95, .28);
      padding: .38rem .9rem;
      border-radius: 999px;
      color: var(--leaf);
      font-size: .8rem;
      font-weight: 700;
      margin-bottom: 1rem;
      background: rgba(31, 143, 95, .08);
    }
    .badge::before {
      content: "";
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--leaf);
    }
    .badge.sold { color: #b42318; border-color: rgba(180, 35, 24, .25); background: rgba(180, 35, 24, .06); }
    .badge.sold::before { background: #b42318; }

    h1 {
      margin: 0 0 .45rem;
      font-size: clamp(2rem, 6.5vw, 3.1rem);
      line-height: 1.08;
      font-weight: 800;
      direction: ltr;
      letter-spacing: -.03em;
      word-break: break-all;
      color: var(--forest);
    }
    .persian {
      color: var(--muted);
      font-size: 1.05rem;
      margin-bottom: 1.15rem;
      line-height: 1.55;
    }

    .price-block { margin: .35rem 0 1.25rem; }
    .price-label {
      display: block;
      font-size: .8rem;
      font-weight: 700;
      color: var(--forest-soft);
      margin-bottom: .45rem;
    }
    .price {
      display: inline-block;
      margin: 0;
      padding: .85rem 1.5rem;
      border-radius: 6px;
      background: var(--leaf);
      color: #fff;
      font-size: clamp(1.05rem, 3.2vw, 1.22rem);
      font-weight: 800;
      line-height: 1.45;
      box-shadow: 0 10px 28px rgba(31, 143, 95, .28);
    }
    .price.unpriced {
      background: #6b7f74;
      box-shadow: none;
    }
    .sale-btn-reveal {
      border-color: var(--leaf);
      background: #fff;
      color: var(--forest);
      box-shadow: 0 8px 22px rgba(31, 143, 95, .2);
    }
    .price-reveal-panel {
      background: #fff;
      color: var(--ink);
      border-color: rgba(15, 59, 44, .12);
    }
    .price-reveal-amount {
      background: linear-gradient(145deg, #1f8f5f 0%, #0d5c3d 100%);
      color: #fff;
      border: 2px solid rgba(255, 255, 255, .35);
      box-shadow: 0 12px 32px rgba(31, 143, 95, .35);
    }
    .price-reveal-hint { color: var(--muted); }
    .price-reveal-offer { color: #5a6f64; }
    .price-reveal-offer:hover { color: var(--forest); }

    .desc {
      color: var(--muted);
      font-size: .98rem;
      line-height: 1.8;
      margin: 0 auto 1rem;
      max-width: 36rem;
      text-align: right;
    }

    .chips {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: .4rem;
      margin: 0 0 1rem;
    }
    .chip {
      font-size: .74rem;
      padding: .28rem .7rem;
      border-radius: 999px;
      border: 1px solid var(--line);
      color: var(--muted);
      background: rgba(15, 59, 44, .04);
    }

    .details {
      margin: 0 0 1.15rem;
      text-align: right;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: rgba(15, 59, 44, .03);
      overflow: hidden;
    }
    .details-heading {
      margin: 0;
      padding: .8rem 1rem;
      font-size: .9rem;
      font-weight: 700;
      color: var(--forest);
    }
    .details-body {
      padding: 1.05rem 1rem .95rem;
      color: var(--muted);
      font-size: .9rem;
      line-height: 1.8;
      border-top: 1px solid var(--line);
    }

    .buy-section {
      margin-top: 1.1rem;
      padding-top: 1.1rem;
      border-top: 1px solid var(--line);
    }
    .buy-heading {
      margin: 0 0 .25rem;
      font-size: 1.08rem;
      font-weight: 800;
      color: var(--forest);
    }
    .buy-sub {
      margin: 0 0 .85rem;
      color: var(--muted);
      font-size: .86rem;
      line-height: 1.5;
    }

    .sale-channels {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: .75rem .5rem;
    }
    .sale-ch {
      appearance: none;
      -webkit-appearance: none;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      cursor: pointer;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
      text-align: center;
      padding: .55rem .35rem;
      border-radius: 10px;
      transition: background .15s ease, transform .12s ease;
      flex: 0 1 7.8rem;
      width: 7.8rem;
    }
    .sale-ch:hover { background: rgba(15, 59, 44, .06); }
    .sale-ch:active { transform: scale(.98); }
    .sale-ch-icon {
      width: 3.1rem;
      height: 3.1rem;
      margin: 0 auto .55rem;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #fff;
      border: 1px solid var(--line);
      box-shadow: 0 6px 16px rgba(15, 40, 28, .08);
    }
    .sale-ch-icon svg { width: 1.35rem; height: 1.35rem; fill: currentColor; }
    .sale-ch[data-channel="telegram"] .sale-ch-icon { color: var(--telegram); }
    .sale-ch[data-channel="sms"] .sale-ch-icon { color: var(--sms); }
    .sale-ch[data-channel="phone"] .sale-ch-icon { color: var(--phone); }
    .sale-ch[data-channel="bale"] .sale-ch-icon { color: var(--bale); }
    .sale-ch[data-channel="whatsapp"] .sale-ch-icon { color: var(--whatsapp); }
    .sale-ch-text strong {
      display: block;
      font-size: .95rem;
      font-weight: 800;
      margin-bottom: .2rem;
      color: var(--ink);
    }
    .sale-ch-text span {
      display: block;
      font-size: .78rem;
      line-height: 1.45;
      color: var(--muted);
    }

    .meta {
      margin-top: 1rem;
      color: var(--muted);
      font-size: .86rem;
      line-height: 1.6;
    }

    .trust {
      list-style: none;
      margin: 1.15rem 0 0;
      padding: 0;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: .45rem .7rem;
      font-size: .8rem;
      color: var(--muted);
    }
    .trust li {
      display: inline-flex;
      align-items: center;
      gap: .3rem;
    }
    .trust li::before {
      content: "✓";
      color: var(--leaf);
      font-weight: 800;
      font-size: .75rem;
    }

        .modal {
          position: fixed;
          inset: 0;
          z-index: 1000;
          display: flex;
          align-items: flex-end;
          justify-content: center;
          padding: 1rem;
          opacity: 0;
          visibility: hidden;
          transition: opacity .2s ease, visibility .2s ease;
        }
        .modal:not(.is-open) { pointer-events: none; }
        .modal.is-open { opacity: 1; visibility: visible; }
        @media (min-width: 480px) { .modal { align-items: center; } }
        .modal-backdrop {
          position: absolute;
          inset: 0;
          background: rgba(0,0,0,.68);
          backdrop-filter: blur(4px);
          -webkit-backdrop-filter: blur(4px);
        }
        .modal-panel {
          position: relative;
          width: min(440px, 100%);
          background: #102820;
          border: 1px solid var(--line);
          border-radius: 20px 20px 16px 16px;
          padding: 1.35rem 1.25rem 1.15rem;
          box-shadow: var(--shadow);
          transform: translateY(1rem);
          transition: transform .22s ease;
        }
        .modal-panel.disclaimer {
          border-top: 3px solid #f0b429;
          padding-top: 1.15rem;
        }
        @media (min-width: 480px) { .modal-panel { border-radius: 20px; } }
        .modal.is-open .modal-panel { transform: translateY(0); }
        .modal-eyebrow {
          margin: 0 0 .85rem;
          font-size: .78rem;
          font-weight: 700;
          letter-spacing: .04em;
          color: #f0b429;
          text-align: center;
        }
        .modal-body {
          margin: 0 0 1.15rem;
          color: var(--muted);
          font-size: .95rem;
          line-height: 1.7;
          text-align: center;
        }
        .modal-short {
          margin: 0 0 .55rem;
          color: var(--ink);
          font-size: 1rem;
          font-weight: 600;
          line-height: 1.65;
        }
        .modal-short-en {
          margin: 0;
          direction: ltr;
          text-align: center;
          font-size: .88rem;
          line-height: 1.55;
          color: #8fa899;
        }
        .modal-actions-stacked {
          display: flex;
          flex-direction: column;
          gap: .55rem;
        }
        .modal-actions-stacked .btn-modal.confirm {
          min-height: auto;
          padding: .85rem .9rem;
          font-size: .92rem;
          font-weight: 700;
          box-shadow: 0 8px 24px rgba(62,207,130,.22);
          display: flex;
          flex-direction: column;
          align-items: center;
          gap: .35rem;
          line-height: 1.35;
        }
        .confirm-channel {
          display: inline-flex;
          align-items: center;
          gap: .4rem;
          font-size: .82rem;
          font-weight: 600;
          opacity: .92;
        }
        .confirm-channel svg {
          width: 1rem;
          height: 1rem;
          fill: currentColor;
          flex-shrink: 0;
        }
        .confirm-intent {
          display: block;
          font-size: 1rem;
          font-weight: 800;
        }
        .modal-actions-stacked .btn-modal.cancel {
          min-height: 42px;
          font-size: .88rem;
          font-weight: 500;
          border-color: transparent;
          color: #7a9084;
        }
        .modal-actions-row {
          display: grid;
          grid-template-columns: 1fr 1fr;
          gap: .55rem;
        }
        .btn-modal {
          appearance: none;
          border: 1px solid var(--line);
          border-radius: 12px;
          padding: .8rem .75rem;
          font: inherit;
          font-size: .9rem;
          font-weight: 600;
          cursor: pointer;
          touch-action: manipulation;
          min-height: 48px;
        }
        .btn-modal.cancel { background: transparent; color: var(--muted); }
        .btn-modal.confirm {
          background: linear-gradient(135deg, #3ecf82, #2da866);
          border-color: transparent;
          color: #042a14;
        }
        .fallback-number {
          display: block;
          margin: .65rem 0;
          font-size: clamp(1.55rem, 7vw, 2rem);
          font-weight: 800;
          letter-spacing: .04em;
          direction: ltr;
          color: var(--ink);
          text-align: center;
        }
        .fallback-hint {
          font-size: .82rem;
          color: var(--muted);
          line-height: 1.65;
          text-align: center;
          margin: 0 0 .65rem;
        }
        .fallback-message {
          display: block;
          width: 100%;
          margin: 0 0 .75rem;
          padding: .75rem .85rem;
          border-radius: 12px;
          border: 1px solid var(--line);
          background: rgba(0,0,0,.22);
          color: var(--ink);
          font: inherit;
          font-size: .82rem;
          line-height: 1.7;
          text-align: right;
          resize: none;
          min-height: 5.5rem;
        }
        .fallback-message[hidden] { display: none !important; }
        .btn-modal.secondary[hidden],
        .btn-modal.cancel[hidden] { display: none !important; }
        .modal-actions-row:has(.btn-modal[hidden]) {
          grid-template-columns: 1fr;
        }
        .btn-modal.secondary {
          background: rgba(255,255,255,.05);
          color: var(--ink);
        }
        .btn-modal.primary-action {
          background: linear-gradient(135deg, rgba(110,196,255,.25), rgba(110,196,255,.08));
          border-color: rgba(110,196,255,.35);
          color: var(--ink);
        }
        .copy-toast {
          text-align: center;
          font-size: .78rem;
          color: var(--ok);
          min-height: 1.1rem;
          margin-bottom: .35rem;
        }
        .sale-price-flow { margin: .5rem 0 1rem; text-align: center; }
        .sale-price-label, .sale-price-flow .price-label {
          display: block;
          font-size: .78rem;
          font-weight: 700;
          letter-spacing: .06em;
          color: var(--gold, #d4b06a);
          margin-bottom: .45rem;
        }
        .sale-btn-reveal {
          display: inline-block;
          appearance: none;
          margin-top: .65rem;
          border: 2px solid rgba(62,207,130,.55);
          background: rgba(255,255,255,.08);
          color: var(--ink, #f6fbf8);
          border-radius: 14px;
          padding: .7rem 1.35rem;
          font: inherit;
          font-size: .95rem;
          font-weight: 800;
          cursor: pointer;
          touch-action: manipulation;
          box-shadow: 0 6px 20px rgba(0,0,0,.18);
        }
        .sale-price-teaser.price {
          letter-spacing: .06em;
        }
        .sale-price-value.unpriced { opacity: .82; color: var(--muted, #9eb5a8); }
        .price-reveal-panel { max-width: min(480px, 100%); text-align: center; }
        .price-reveal-panel .modal-title {
          margin: 0 0 .5rem;
          font-size: .82rem;
          font-weight: 700;
          letter-spacing: .04em;
          color: var(--gold, #c9a227);
        }
        .price-reveal-domain {
          margin: 0 0 .85rem;
          padding: .65rem .85rem;
          border-radius: 14px;
          border: 1px solid rgba(255,255,255,.12);
          background: rgba(0,0,0,.12);
        }
        .price-reveal-domain-name {
          margin: 0;
          font-size: clamp(1.35rem, 5vw, 1.65rem);
          font-weight: 800;
          letter-spacing: .02em;
          line-height: 1.25;
          word-break: break-all;
        }
        .price-reveal-domain-persian {
          margin: .35rem 0 0;
          font-size: .92rem;
          font-weight: 600;
          color: var(--muted, #9eb5a8);
          line-height: 1.5;
        }
        .price-reveal-amount {
          display: inline-block;
          margin: 0 0 1rem;
          padding: .9rem 1.45rem;
          border-radius: 16px;
          border: 2px solid rgba(31, 143, 95, .45);
          background: linear-gradient(145deg, #1a6b4a 0%, #0f3b2c 100%);
          font-size: clamp(1.12rem, 4.2vw, 1.35rem);
          font-weight: 800;
          color: #ffffff;
          line-height: 1.45;
          letter-spacing: .02em;
          text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
          box-shadow: 0 10px 28px rgba(15, 59, 44, .28);
        }
        .price-reveal-hint {
          margin: 0 0 .9rem;
          color: var(--muted, #5a6f64);
          font-size: .86rem;
          line-height: 1.65;
          text-align: center;
          max-width: 26rem;
          margin-inline: auto;
        }
        .price-reveal-offer {
          display: block;
          width: 100%;
          margin: .85rem 0 0;
          padding: .35rem .5rem;
          border: none;
          background: none;
          color: var(--muted, #6b7f74);
          font: inherit;
          font-size: .72rem;
          line-height: 1.55;
          cursor: pointer;
          text-align: center;
          text-decoration: underline;
          text-underline-offset: 2px;
        }
        .price-reveal-offer:hover { color: var(--ink, #0f3b2c); }
        .price-reveal-offer.is-expanded {
          cursor: default;
          text-decoration: none;
          color: var(--muted, #5a6f64);
          font-size: .7rem;
        }

    .modal-backdrop {
      background: rgba(15, 40, 28, .42);
    }
    .modal-panel {
      background: #f7faf8;
      color: var(--ink);
      border: 1px solid var(--line);
      border-radius: 18px;
      box-shadow: 0 22px 60px rgba(15, 40, 28, .22);
    }
    .modal-eyebrow {
      display: inline-block;
      color: var(--forest-soft);
      background: rgba(31, 143, 95, .08);
      border: 1px solid rgba(31, 143, 95, .22);
      border-radius: 999px;
      padding: .35rem .85rem;
      margin: 0 auto .95rem;
    }
    .modal-panel.disclaimer {
      border-top: 3px solid var(--leaf);
      text-align: center;
    }
    .modal-title {
      margin: 0 0 1rem;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: .45rem;
      font-size: 1.05rem;
      font-weight: 800;
      color: var(--forest);
      text-align: center;
    }
    .modal-title svg {
      width: 1.15rem;
      height: 1.15rem;
      fill: currentColor;
      color: var(--leaf);
      flex-shrink: 0;
    }
    .modal-body { color: var(--muted); }
    .modal-short { color: var(--ink); }
    .modal-short-en { color: var(--muted); }
    .fallback-hint { color: var(--forest-soft); font-weight: 600; }
    .fallback-number { color: var(--forest); }
    .fallback-message {
      background: #fff;
      border: 1px solid var(--line);
      color: var(--ink);
      border-radius: 10px;
    }
    .fallback-message[hidden] { display: none !important; }
    .btn-modal {
      border-radius: 10px;
      border-color: var(--line);
    }
    .btn-modal.confirm {
      background: var(--leaf);
      border-color: transparent;
      color: #fff;
      box-shadow: 0 10px 28px rgba(31, 143, 95, .28);
    }
    .modal-actions-stacked .btn-modal.confirm {
      box-shadow: 0 10px 28px rgba(31, 143, 95, .28);
    }
    .btn-modal.cancel {
      background: #fff;
      color: var(--forest);
      border: 1px solid var(--line);
    }
    .modal-actions-stacked .btn-modal.cancel {
      color: var(--muted);
      background: transparent;
      border-color: transparent;
    }
    .btn-modal.secondary {
      background: #fff;
      color: var(--forest);
      border: 1px solid var(--line);
    }
    .btn-modal.primary-action {
      background: var(--leaf);
      border-color: transparent;
      color: #fff !important;
      box-shadow: 0 8px 22px rgba(31, 143, 95, .24);
    }
    .copy-toast { color: var(--leaf); }
    .confirm-channel { color: rgba(255,255,255,.92); }
    .confirm-intent { color: #fff; }

    @media (max-width: 639px) {
      body {
        align-items: flex-start;
        padding: max(.55rem, env(safe-area-inset-top, 0px)) .7rem max(.9rem, env(safe-area-inset-bottom, 0px));
      }
      .card {
        border-radius: 14px;
        padding: 1.05rem .95rem 1.15rem;
      }
      h1 { font-size: clamp(1.75rem, 8vw, 2.2rem); }
      .sale-channels {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .55rem;
      }
      .sale-ch {
        width: auto;
        flex: none;
        border: 1px solid var(--line);
        background: rgba(255,255,255,.65);
        padding: .7rem .5rem;
      }
      .sale-ch[data-channel="telegram"] { grid-column: 1 / -1; }
      .sale-ch-icon {
        width: 2.6rem;
        height: 2.6rem;
        margin-bottom: .4rem;
      }
    }
  </style>
</head>
<body>
  <main class="wrap">
    <div class="card">
      <div class="badge">برای فروش</div>
      <h1>spacescience.ir</h1>
      <div class="persian">علوم فضایی · خوانده می‌شود: علوم فضایی</div>

      <div class="sale-price-flow price-block" id="price-block" data-has-price="1">
        <span class="sale-price-label price-label">قیمت مصوب</span>
        <div class="sale-price-teaser price" id="price-teaser" aria-hidden="false">... میلیون تومان</div>
        <button type="button" class="sale-btn-reveal" id="btn-price-reveal">مشاهده قیمت</button>
      </div>

      <p class="desc">در بازار نجوم، نامی مانند «علوم فضایی» می‌تواند هویت روشنی بسازد. به دانش نجوم و پژوهش‌های مربوط به فضا اشاره دارد و امکان انتشار اخبار اکتشافات فضایی را در قالب یک برند فراهم می‌کند.</p>

      <div class="chips" aria-label="برچسب‌ها">
        <span class="chip">نجوم</span><span class="chip">فضا</span><span class="chip">علم</span>
      </div>

      <section class="details" aria-label="توضیحات درباره دامنه">
        <h2 class="details-heading">توضیحات درباره دامنه</h2>
        <div class="details-body">در نگاه اول، «علوم فضایی» به دانش نجوم و پژوهش‌های مربوط به فضا اشاره دارد. مزیت دیگر این ترکیب، موضوع تخصصی جذاب برای علاقه‌مندان علوم است که برای نام‌گذاری تجاری اهمیت دارد.

کاربردهای واقعی آن می‌تواند انتشار اخبار اکتشافات فضایی و معرفی دوره‌های نجوم باشد. برای رسانه‌های علمی و آموزشگاه‌های نجوم، گردآوری این خدمات در یک نشانی به معرفی منظم کسب‌وکار کمک می‌کند.

داشتن نام مشخص در نشانی سایت، معرفی خدمات را در تبلیغات ساده‌تر می‌کند؛ به‌ویژه برای بازار نجوم. برای شروع گفتگو درباره خرید دامنه، از دکمه‌های تماس استفاده کنید.</div>
      </section>

      <ul class="trust" aria-label="مزایا">
        <li>انتقال رسمی nic.ir</li>
        <li>پاسخ سریع</li>
        <li>قیمت شفاف</li>
      </ul>
    </div>
  </main>

    <div class="modal" id="disclaimer-modal" aria-hidden="true">
      <div class="modal-backdrop" data-dismiss="modal"></div>
      <div class="modal-panel disclaimer" role="dialog" aria-modal="true" aria-labelledby="modal-short">
        <p class="modal-eyebrow">Domain for sale · دامنه برای فروش</p>
        <div class="modal-body">
          <p class="modal-short" id="modal-short">وب‌سایت فعالیتی ندارد، برای خدمات قبلی سایت پیام ندهید.</p>
          <p class="modal-short-en">This website has no activity. Do not message about previous site services.</p>
        </div>
        <div class="modal-actions-stacked">
          <button type="button" class="btn-modal confirm" id="modal-confirm">
            <span class="confirm-channel" id="confirm-channel-line">
              <span id="confirm-icon" aria-hidden="true"></span>
              <span id="confirm-channel-text">ارسال پیام در تلگرام</span>
            </span>
            <span class="confirm-intent" id="confirm-intent">می‌خواهم دامنه را بخرم</span>
          </button>
          <button type="button" class="btn-modal cancel" data-dismiss="modal">انصراف - دامنه نمی خواهم</button>
        </div>
      </div>
    </div>
  
    <div class="modal" id="price-reveal-modal" aria-hidden="true">
      <div class="modal-backdrop" data-dismiss="price-reveal"></div>
      <div class="modal-panel price-reveal-panel" role="dialog" aria-modal="true" aria-labelledby="price-reveal-title">
        <h2 class="modal-title" id="price-reveal-title">قیمت مصوب</h2>
        <div class="price-reveal-domain" aria-label="دامنه">
          <p class="price-reveal-domain-name ltr" dir="ltr">spacescience.ir</p>
          <p class="price-reveal-domain-persian">علوم فضایی · خوانده می‌شود: علوم فضایی</p>
        </div>
        <div class="price-reveal-amount" id="modal-price-value" aria-live="polite"></div>
        <p class="price-reveal-hint" id="price-reveal-hint">
          برای خرید این دامنه، از طریق یکی از روش‌های زیر، ارتباط بگیرید.
        </p>
        <div class="sale-channels js-sale-contact-root" id="contact-actions-modal">
          <button type="button" class="sale-ch" data-channel="telegram" data-label="تلگرام">
            <span class="sale-ch-icon" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.64 6.8c-.15 1.58-.8 5.42-1.13 7.19-.14.75-.42 1-.68 1.03-.58.05-1.02-.38-1.58-.75-.88-.58-1.38-.94-2.23-1.5-.99-.65-.35-1.01.22-1.59.15-.15 2.71-2.48 2.76-2.69a.2.2 0 0 0-.05-.18c-.06-.05-.14-.03-.21-.02-.09.02-1.49.95-4.22 2.79-.4.27-.76.41-1.08.4-.36-.01-1.04-.2-1.55-.37-.63-.2-1.12-.31-1.08-.66.02-.18.27-.36.74-.55 2.92-1.27 4.86-2.11 5.83-2.51 2.78-1.16 3.35-1.36 3.73-1.36.08 0 .27.02.39.12.1.08.13.19.14.27-.01.06.01.24 0 .38z"/></svg></span>
            <span class="sale-ch-text"><strong>تلگرام</strong><span>ارسال پیام در تلگرام (بهترین)</span></span>
          </button>
          <button type="button" class="sale-ch" data-channel="sms" data-label="پیامک">
            <span class="sale-ch-icon" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H5.17L4 17.17V4h16v12z"/></svg></span>
            <span class="sale-ch-text"><strong>پیامک</strong><span>پیامک (سریع‌ترین)</span></span>
          </button>
          <button type="button" class="sale-ch" data-channel="phone" data-label="تماس">
            <span class="sale-ch-icon" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M6.6 10.8c1.5 2.9 3.7 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.5.6.6 0 1 .4 1 1V21c0 .6-.4 1-1 1C10.3 22 2 13.7 2 3c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.2.2 2.4.6 3.5.1.3 0 .7-.2 1L6.6 10.8z"/></svg></span>
            <span class="sale-ch-text"><strong>تماس</strong><span>صحبت تلفنی</span></span>
          </button>
          <button type="button" class="sale-ch" data-channel="bale" data-label="بله">
            <span class="sale-ch-icon" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.15 2 11.2c0 2.9 1.46 5.5 3.74 7.2L5 22l3.6-1.8c1.05.29 2.16.45 3.4.45 5.52 0 10-4.15 10-9.2S17.52 2 12 2z"/></svg></span>
            <span class="sale-ch-text"><strong>بله</strong><span>ارسال پیام در بله</span></span>
          </button>
          <button type="button" class="sale-ch" data-channel="whatsapp" data-label="واتساپ">
            <span class="sale-ch-icon" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347z"/><path d="M12 0C5.373 0 0 5.373 0 12c0 2.625.846 5.059 2.284 7.034L.789 23.492a.75.75 0 0 0 .957.957l4.458-1.495A11.95 11.95 0 0 0 12 24c6.627 0 12-5.373 12-12S18.627 0 12 0zm0 21.75a9.714 9.714 0 0 1-4.96-1.356l-.355-.21-3.14 1.054 1.054-3.14-.231-.366A9.714 9.714 0 0 1 2.25 12C2.25 6.615 6.615 2.25 12 2.25S21.75 6.615 21.75 12 17.385 21.75 12 21.75z"/></svg></span>
            <span class="sale-ch-text"><strong>واتساپ</strong><span>پیام در واتساپ</span></span>
          </button>
        </div>
        <button type="button" class="price-reveal-offer" id="btn-price-offer" aria-expanded="false">
          <span id="price-offer-label">پیشنهاد قیمت دیگری دارید؟</span>
        </button>
        <div style="margin-top:.75rem">
          <button type="button" class="btn-modal cancel" data-dismiss="price-reveal">بستن</button>
        </div>
      </div>
    </div>
  
    <div class="modal" id="channel-fallback-modal" aria-hidden="true">
      <div class="modal-backdrop" data-dismiss="fallback"></div>
      <div class="modal-panel" role="dialog" aria-modal="true" aria-labelledby="fallback-title">
        <h2 class="modal-title" id="fallback-title">
          <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/></svg>
          <span id="fallback-title-text">راهنمای ارتباط</span>
        </h2>
        <div class="modal-body">
          <p class="fallback-hint" id="fallback-hint"></p>
          <span class="fallback-number" id="fallback-number" hidden></span>
          <textarea class="fallback-message" id="fallback-message" readonly hidden rows="4"></textarea>
          <p class="copy-toast" id="copy-toast" aria-live="polite"></p>
        </div>
        <div class="modal-actions-row">
          <button type="button" class="btn-modal cancel" data-dismiss="fallback">بستن</button>
          <button type="button" class="btn-modal secondary" id="fallback-copy">کپی متن</button>
        </div>
        <div class="modal-actions-stacked" style="margin-top:.55rem">
          <button type="button" class="btn-modal primary-action" id="fallback-retry">تلاش مجدد</button>
        </div>
      </div>
    </div>
    <script>
      (function(){
        function b64ToUtf8(b64){
          var bin = atob(b64);
          if (typeof TextDecoder !== 'undefined') {
            var bytes = new Uint8Array(bin.length);
            for (var i = 0; i < bin.length; i++) bytes[i] = bin.charCodeAt(i);
            return new TextDecoder('utf-8').decode(bytes);
          }
          return decodeURIComponent(Array.prototype.map.call(bin, function(c){
            return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
          }).join(''));
        }
  
        var cfg;
        try {
          cfg = JSON.parse(b64ToUtf8("eyJwaG9uZUUxNjQiOiI5ODkxMjIzNjc4NjAiLCJwaG9uZURpc3BsYXkiOiIwOTEyLTIzNjc4NjAiLCJiYWxlVXJsIjoiaHR0cHM6Ly9ibGUuaXIvZW1yYTIyOCIsIndoYXRzYXBwRTE2NCI6Ijk4OTEyMjM2Nzg2MCIsInRlbGVncmFtIjoiOTg5MTIyMzY3ODYwIiwiZG9tYWluIjoic3BhY2VzY2llbmNlLmlyIiwiaGFzUHJpY2UiOnRydWV9"));
        } catch (e) {
          return;
        }
  
        var pendingChannel = null;
        var contactIntent = 'buy';
        var fallbackRetryUrl = '';
        var fallbackMessageText = '';
        cfg.priceText = '';
        var modal = document.getElementById('disclaimer-modal');
        var priceRevealModal = document.getElementById('price-reveal-modal');
        var modalPriceValue = document.getElementById('modal-price-value');
        var fallbackModal = document.getElementById('channel-fallback-modal');
        var confirmBtn = document.getElementById('modal-confirm');
        var confirmIcon = document.getElementById('confirm-icon');
        var confirmChannelText = document.getElementById('confirm-channel-text');
        var confirmIntent = document.getElementById('confirm-intent');
        var fallbackTitle = document.getElementById('fallback-title-text');
        var fallbackHint = document.getElementById('fallback-hint');
        var fallbackNumber = document.getElementById('fallback-number');
        var fallbackMessage = document.getElementById('fallback-message');
        var fallbackCopyBtn = document.getElementById('fallback-copy');
        var fallbackRetryBtn = document.getElementById('fallback-retry');
        var copyToast = document.getElementById('copy-toast');
  
        var channelActionText = {
          telegram: 'ارسال پیام در تلگرام',
          bale: 'ارسال پیام در بله',
          sms: 'ارسال پیامک',
          phone: 'صحبت تلفنی',
          whatsapp: 'ارسال پیام در واتساپ'
        };
  
        var channelIcons = {
          telegram: '<svg viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.64 6.8c-.15 1.58-.8 5.42-1.13 7.19-.14.75-.42 1-.68 1.03-.58.05-1.02-.38-1.58-.75-.88-.58-1.38-.94-2.23-1.5-.99-.65-.35-1.01.22-1.59.15-.15 2.71-2.48 2.76-2.69a.2.2 0 0 0-.05-.18c-.06-.05-.14-.03-.21-.02-.09.02-1.49.95-4.22 2.79-.4.27-.76.41-1.08.4-.36-.01-1.04-.2-1.55-.37-.63-.2-1.12-.31-1.08-.66.02-.18.27-.36.74-.55 2.92-1.27 4.86-2.11 5.83-2.51 2.78-1.16 3.35-1.36 3.73-1.36.08 0 .27.02.39.12.1.08.13.19.14.27-.01.06.01.24 0 .38z"/></svg>',
          bale: '<svg viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.15 2 11.2c0 2.9 1.46 5.5 3.74 7.2L5 22l3.6-1.8c1.05.29 2.16.45 3.4.45 5.52 0 10-4.15 10-9.2S17.52 2 12 2z"/></svg>',
          sms: '<svg viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H5.17L4 17.17V4h16v12z"/></svg>',
          phone: '<svg viewBox="0 0 24 24"><path d="M6.6 10.8c1.5 2.9 3.7 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.5.6.6 0 1 .4 1 1V21c0 .6-.4 1-1 1C10.3 22 2 13.7 2 3c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.2.2 2.4.6 3.5.1.3 0 .7-.2 1L6.6 10.8z"/></svg>',
          whatsapp: '<svg viewBox="0 0 24 24"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347z"/><path d="M12 0C5.373 0 0 5.373 0 12c0 2.625.846 5.059 2.284 7.034L.789 23.492a.75.75 0 0 0 .957.957l4.458-1.495A11.95 11.95 0 0 0 12 24c6.627 0 12-5.373 12-12S18.627 0 12 0zm0 21.75a9.714 9.714 0 0 1-4.96-1.356l-.355-.21-3.14 1.054 1.054-3.14-.231-.366A9.714 9.714 0 0 1 2.25 12C2.25 6.615 6.615 2.25 12 2.25S21.75 6.615 21.75 12 17.385 21.75 12 21.75z"/></svg>'
        };
  
        function smsHref(number, message){
          var ua = navigator.userAgent.toLowerCase();
          var ios = ua.indexOf('iphone') > -1 || ua.indexOf('ipad') > -1;
          var sep = ios ? '&' : '?';
          return 'sms:+' + number + sep + 'body=' + encodeURIComponent(message);
        }
  
        /** پیام پیش‌فرض پیامک/واتساپ/تلگرام/بله — حتی در حالت پیشنهاد قیمت تغییر ندهید. */
        function buyMessage(){
          var price = cfg.priceText ? (' با قیمت مصوب ' + cfg.priceText) : '';
          return (
            'سلام، دامنه سایت اینترنتی ' +
            cfg.domain +
            ' را' +
            price +
            ' خریدارم. فرآیند انتقال دامنه را (می‌دانم / توضیح دهید)'
          );
        }
  
        function activeMessage(){
          return buyMessage();
        }
  
        function resetOfferHint(){
          var btnOffer = document.getElementById('btn-price-offer');
          var offerLabel = document.getElementById('price-offer-label');
          if (offerLabel) offerLabel.textContent = 'پیشنهاد قیمت دیگری دارید؟';
          if (btnOffer) {
            btnOffer.classList.remove('is-expanded');
            btnOffer.setAttribute('aria-expanded', 'false');
          }
        }
  
        function openPriceRevealModal(text){
          contactIntent = 'buy';
          cfg.priceText = text || '';
          resetOfferHint();
          if (modalPriceValue) {
            modalPriceValue.textContent = text || '';
          }
          if (priceRevealModal) {
            priceRevealModal.classList.add('is-open');
            priceRevealModal.setAttribute('aria-hidden', 'false');
          }
        }
  
        function hidePriceRevealModal(){
          if (priceRevealModal) {
            priceRevealModal.classList.remove('is-open');
            priceRevealModal.setAttribute('aria-hidden', 'true');
          }
        }
  
        function revealPrice(){
          if (!cfg.hasPrice) return;
          fetch('/api/public/price-reveal', {
            method: 'POST',
            headers: { 'Content-Type': 'application/json' },
            body: JSON.stringify({ domain: cfg.domain }),
            credentials: 'same-origin'
          })
            .then(function(r){ return r.json(); })
            .then(function(data){
              if (data && data.ok) {
                openPriceRevealModal(data.displayText || data.priceText || '');
              }
            })
            .catch(function(){});
        }
  
        function telUrl(){
          return 'tel:+' + cfg.phoneE164;
        }
  
        function channelUrl(channel){
          var msg = activeMessage();
          if (channel === 'bale') return cfg.baleUrl;
          if (channel === 'sms') return smsHref(cfg.phoneE164, msg);
          if (channel === 'phone') return telUrl();
          if (channel === 'whatsapp') return 'https://wa.me/' + cfg.whatsappE164 + '?text=' + encodeURIComponent(msg);
          if (channel === 'telegram') return 'https://t.me/+' + cfg.telegram + '?text=' + encodeURIComponent(msg);
          return '#';
        }
  
        function copyText(text){
          return new Promise(function(resolve){
            function legacyCopy(){
              try {
                var ta = document.createElement('textarea');
                ta.value = text;
                ta.setAttribute('readonly', '');
                ta.style.position = 'fixed';
                ta.style.opacity = '0';
                document.body.appendChild(ta);
                ta.select();
                var ok = document.execCommand('copy');
                document.body.removeChild(ta);
                resolve(!!ok);
              } catch (e) {
                resolve(false);
              }
            }
            if (navigator.clipboard && window.isSecureContext) {
              navigator.clipboard.writeText(text).then(function(){ resolve(true); }).catch(legacyCopy);
            } else {
              legacyCopy();
            }
          });
        }
  
        function trackClick(channel){
          var payload = JSON.stringify({
            domain: cfg.domain,
            channel: channel,
            intent: contactIntent === 'offer' ? 'offer' : 'buy'
          });
          var sent = false;
          try {
            if (navigator.sendBeacon) {
              sent = navigator.sendBeacon(
                '/api/public/contact-click',
                new Blob([payload], { type: 'application/json' })
              );
            }
          } catch (e) {}
          if (!sent) {
            try {
              fetch('/api/public/contact-click', {
                method: 'POST',
                headers: { 'Content-Type': 'application/json' },
                body: payload,
                keepalive: true,
                credentials: 'same-origin'
              }).catch(function(){});
            } catch (e2) {}
          }
        }
  
        function showFallback(channel, msg){
          fallbackRetryUrl = channelUrl(channel);
          fallbackMessageText = msg || '';
  
          if (fallbackTitle) {
            if (channel === 'phone') fallbackTitle.textContent = 'تماس تلفنی';
            else if (channel === 'sms') fallbackTitle.textContent = 'ارسال پیامک';
            else if (channel === 'bale') fallbackTitle.textContent = 'ارسال پیام در بله';
            else if (channel === 'telegram') fallbackTitle.textContent = 'ارسال پیام در تلگرام';
            else fallbackTitle.textContent = 'راهنمای ارتباط';
          }
  
          if (fallbackHint) {
            if (channel === 'phone') {
              fallbackHint.textContent = 'اگر تماس خودکار برقرار نشد، این شماره را بگیرید:';
            } else if (channel === 'sms') {
              fallbackHint.textContent = 'اگر پیامک در این دستگاه باز نشد، شماره را بگیرید و متن زیر را ارسال کنید:';
            } else if (channel === 'bale') {
              fallbackHint.textContent = 'اگر بله باز نشد، متن زیر را کپی کرده و در بله ارسال کنید:';
            } else if (channel === 'telegram') {
              fallbackHint.textContent = 'اگر تلگرام باز نشد، متن زیر را کپی کرده و ارسال کنید:';
            } else {
              fallbackHint.textContent = 'متن پیام آماده خرید:';
            }
          }
  
          if (fallbackNumber) {
            if (channel === 'phone' || channel === 'sms') {
              fallbackNumber.hidden = false;
              fallbackNumber.textContent = cfg.phoneDisplay || '';
            } else {
              fallbackNumber.hidden = true;
            }
          }
  
          if (fallbackMessage) {
            if (channel === 'phone') {
              fallbackMessage.hidden = true;
            } else {
              fallbackMessage.hidden = false;
              fallbackMessage.value = msg || '';
            }
          }
  
          if (fallbackCopyBtn) fallbackCopyBtn.hidden = channel === 'phone';
          if (copyToast) copyToast.textContent = '';
          if (fallbackRetryBtn) {
            if (channel === 'phone') fallbackRetryBtn.textContent = 'تماس مجدد';
            else if (channel === 'sms') fallbackRetryBtn.textContent = 'تلاش مجدد پیامک';
            else if (channel === 'bale') fallbackRetryBtn.textContent = 'باز کردن بله';
            else if (channel === 'telegram') fallbackRetryBtn.textContent = 'باز کردن تلگرام';
            else fallbackRetryBtn.textContent = 'تلاش مجدد';
          }
  
          if (fallbackModal) {
            fallbackModal.classList.add('is-open');
            fallbackModal.setAttribute('aria-hidden', 'false');
          }
        }
  
        function hideFallback(){
          if (fallbackModal) {
            fallbackModal.classList.remove('is-open');
            fallbackModal.setAttribute('aria-hidden', 'true');
          }
        }
  
        function maybeShowFallback(channel, msg){
          setTimeout(function(){
            if (document.visibilityState === 'visible') showFallback(channel, msg);
          }, 900);
        }
  
        function openChannel(channel){
          var msg = activeMessage();
          var url = channelUrl(channel);
          trackClick(channel);
  
          if (channel === 'phone') {
            window.location.href = url;
            maybeShowFallback('phone', msg);
            return;
          }
  
          if (channel === 'bale' || channel === 'telegram') {
            copyText(msg).then(function(){
              window.location.href = url;
            });
            maybeShowFallback(channel, msg);
            return;
          }
  
          if (channel === 'sms') {
            window.location.href = url;
            maybeShowFallback('sms', msg);
            return;
          }
  
          window.location.href = url;
        }
  
        function showModal(channel, label){
          hidePriceRevealModal();
          pendingChannel = channel;
          if (confirmChannelText) {
            confirmChannelText.textContent = channelActionText[channel] || ('ارتباط از طریق ' + label);
          }
          if (confirmIcon) {
            confirmIcon.innerHTML = channelIcons[channel] || '';
          }
          if (confirmIntent) {
            confirmIntent.textContent =
              'می‌خواهم دامنه ' + (cfg.domain || '') + ' را بخرم';
          }
          if (modal) {
            modal.classList.add('is-open');
            modal.setAttribute('aria-hidden', 'false');
          }
          if (confirmBtn) confirmBtn.focus();
        }
  
        function hideModal(){
          pendingChannel = null;
          if (modal) {
            modal.classList.remove('is-open');
            modal.setAttribute('aria-hidden', 'true');
          }
        }
  
        function bindChannelButtons(root){
          if (!root) return;
          var buttons = root.querySelectorAll('[data-channel]');
          for (var i = 0; i < buttons.length; i++) {
            (function(btn){
              btn.addEventListener('click', function(ev){
                ev.preventDefault();
                var ch = btn.getAttribute('data-channel');
                var label = btn.getAttribute('data-label') || ch;
                if (contactIntent !== 'offer') contactIntent = 'buy';
                if (ch) showModal(ch, label);
              });
            })(buttons[i]);
          }
        }
  
        if (confirmBtn) {
          confirmBtn.addEventListener('click', function(){
            var ch = pendingChannel;
            hideModal();
            if (ch) openChannel(ch);
          });
        }
  
        if (fallbackCopyBtn) {
          fallbackCopyBtn.addEventListener('click', function(){
            copyText(fallbackMessageText).then(function(ok){
              if (copyToast) copyToast.textContent = ok ? 'متن کپی شد' : 'کپی خودکار ممکن نشد — متن را دستی انتخاب کنید';
            });
          });
        }
  
        if (fallbackRetryBtn) {
          fallbackRetryBtn.addEventListener('click', function(){
            if (fallbackRetryUrl) window.location.href = fallbackRetryUrl;
          });
        }
  
        if (modal) {
          modal.addEventListener('click', function(ev){
            var t = ev.target;
            if (t && t.getAttribute && t.getAttribute('data-dismiss') === 'modal') hideModal();
          });
        }
  
        if (priceRevealModal) {
          priceRevealModal.addEventListener('click', function(ev){
            var t = ev.target;
            if (t && t.getAttribute && t.getAttribute('data-dismiss') === 'price-reveal') {
              hidePriceRevealModal();
            }
          });
        }
  
        if (fallbackModal) {
          fallbackModal.addEventListener('click', function(ev){
            var t = ev.target;
            if (t && t.getAttribute && t.getAttribute('data-dismiss') === 'fallback') hideFallback();
          });
        }
  
        document.addEventListener('keydown', function(ev){
          if (ev.key === 'Escape') {
            if (fallbackModal && fallbackModal.classList.contains('is-open')) hideFallback();
            else if (modal && modal.classList.contains('is-open')) hideModal();
            else if (priceRevealModal && priceRevealModal.classList.contains('is-open')) hidePriceRevealModal();
          }
        });
  
        var contactRoots = document.querySelectorAll('.js-sale-contact-root');
        for (var ri = 0; ri < contactRoots.length; ri++) {
          bindChannelButtons(contactRoots[ri]);
        }
  
        var btnReveal = document.getElementById('btn-price-reveal');
        if (btnReveal) {
          btnReveal.addEventListener('click', function(){
            revealPrice();
          });
        }
  
        var btnOffer = document.getElementById('btn-price-offer');
        if (btnOffer) {
          btnOffer.addEventListener('click', function(){
            if (btnOffer.classList.contains('is-expanded')) return;
            contactIntent = 'offer';
            var offerLabel = document.getElementById('price-offer-label');
            if (offerLabel) {
              offerLabel.textContent =
                'برای مذاکره با مبلغ پیشنهادی ارتباط بگیرید.';
            }
            btnOffer.classList.add('is-expanded');
            btnOffer.setAttribute('aria-expanded', 'true');
          });
        }
      })();
    </script>
</body>
</html>
