/* How to buy — comparison table (navy Chinibazar) */
.how-to-buy {
  --htb-navy: #001a72;
  --htb-navy-deep: #00145c;
  --htb-navy-soft: #e8ecf7;
  --htb-navy-muted: #4a5d8c;
  --htb-ink: #1e293b;
  --htb-muted: #64748b;
  --htb-bg: #f4f6fb;
  --htb-surface: #ffffff;
  --htb-line: #d6deef;
  --grade-a: #16a34a;
  --grade-b: #2563eb;
  --grade-c: #d97706;
  --grade-d: #e11d48;
  color: var(--htb-ink);
  background: var(--htb-bg);
  line-height: 1.75;
}

.how-to-buy-page main {
  background: var(--htb-bg);
}

.how-to-buy .htb-wrap {
  width: min(1280px, calc(100% - 28px));
  margin-inline: auto;
}

.how-to-buy__hero {
  padding: 40px 0 32px;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, var(--htb-bg) 100%);
}

.how-to-buy__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--htb-navy);
  background: var(--htb-navy-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.how-to-buy__hero h1 {
  font-size: clamp(1.45rem, 3.5vw, 2rem);
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--htb-navy-deep);
}

.how-to-buy__hero h1 em {
  font-style: normal;
  color: var(--htb-navy);
}

.how-to-buy__hero > .htb-wrap > p {
  max-width: 42rem;
  margin: 0 auto;
  color: var(--htb-muted);
  font-size: 0.95rem;
}

.how-to-buy__steps-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.how-to-buy__step-chip {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--htb-navy-muted);
  background: #fff;
  border: 1px solid var(--htb-line);
  border-radius: 999px;
  padding: 8px 14px;
}

.how-to-buy__compare {
  padding: 8px 0 48px;
}

.how-to-buy__compare-title {
  text-align: center;
  margin-bottom: 22px;
}

.how-to-buy__compare-title h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 800;
  color: var(--htb-navy-deep);
  margin: 0 0 6px;
}

.how-to-buy__compare-title p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--htb-muted);
}

.how-to-buy__table-shell {
  background: linear-gradient(145deg, #eef2fb 0%, #e4eaf8 100%);
  border: 1px solid var(--htb-line);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 16px 40px rgba(0, 26, 114, 0.08);
}

.how-to-buy__table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  background: var(--htb-surface);
}

.how-to-buy__table {
  width: 100%;
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
}

.how-to-buy__table thead th {
  background: linear-gradient(180deg, var(--htb-navy) 0%, var(--htb-navy-deep) 100%);
  color: #fff;
  font-weight: 700;
  text-align: center;
  padding: 14px 10px;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.how-to-buy__table thead th:first-child {
  border-radius: 12px 0 0 0;
  text-align: right;
  padding-right: 16px;
}

.how-to-buy__table thead th:last-child {
  border-radius: 0 12px 0 0;
}

.how-to-buy__table tbody td {
  padding: 14px 10px;
  vertical-align: middle;
  text-align: center;
  border-bottom: 1px solid var(--htb-line);
  color: var(--htb-ink);
  line-height: 1.65;
}

.how-to-buy__table tbody tr:last-child td {
  border-bottom: none;
}

.how-to-buy__table tbody tr:nth-child(even) td {
  background: #fafbff;
}

.how-to-buy__provider {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
  min-width: 150px;
}

.how-to-buy__provider-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--htb-navy-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--htb-line);
}

.how-to-buy__provider-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.how-to-buy__provider-fallback {
  font-weight: 800;
  color: var(--htb-navy);
  font-size: 1rem;
}

.how-to-buy__provider-name {
  font-weight: 800;
  color: var(--htb-navy);
  font-size: 0.88rem;
  line-height: 1.4;
}

.how-to-buy__ceil {
  font-weight: 700;
  color: var(--htb-navy-deep);
  white-space: nowrap;
}

.how-to-buy__categories {
  max-width: 200px;
  margin-inline: auto;
  font-size: 0.8rem;
  color: var(--htb-muted);
  text-align: center;
  line-height: 1.55;
}

.how-to-buy__grades-empty {
  color: #94a3b8;
  font-size: 0.95rem;
}

.how-to-buy__grades {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.how-to-buy__grade {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
}

.how-to-buy__grade--A { background: var(--grade-a); }
.how-to-buy__grade--B { background: var(--grade-b); }
.how-to-buy__grade--C { background: var(--grade-c); }
.how-to-buy__grade--D { background: var(--grade-d); }

.how-to-buy__special {
  max-width: 180px;
  margin-inline: auto;
  font-size: 0.78rem;
  color: var(--htb-muted);
  line-height: 1.5;
}

.how-to-buy__buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  min-width: 132px;
  border-radius: 10px;
  background: linear-gradient(180deg, #0a2d9e 0%, var(--htb-navy) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 26, 114, 0.25);
  transition: transform 0.1s, box-shadow 0.15s;
}

.how-to-buy__buy-btn:hover {
  box-shadow: 0 6px 18px rgba(0, 26, 114, 0.35);
  color: #fff;
}

.how-to-buy__buy-btn:active {
  transform: scale(0.98);
}

.how-to-buy__note {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px dashed var(--htb-line);
  font-size: 0.82rem;
  color: var(--htb-navy-muted);
  text-align: center;
  line-height: 1.7;
}

/* پایین صفحه — بدون نوار سرمه‌ای جدا (هم‌راستا با فوتر سایت) */
.how-to-buy__end {
  padding: 0 0 8px;
  background: var(--htb-bg);
}

.how-to-buy__end-inner {
  background: #fff;
  border: 1px solid var(--htb-line);
  border-radius: 16px;
  padding: 20px 18px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 26, 114, 0.06);
}

.how-to-buy-page main {
  padding-bottom: 0;
}

.how-to-buy__end-lead {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--htb-muted);
  line-height: 1.7;
}

.how-to-buy__end-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.how-to-buy__end-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
}

.how-to-buy__end-btn--primary {
  background: var(--htb-navy);
  color: #fff;
}

.how-to-buy__end-btn--ghost {
  background: #fff;
  color: var(--htb-navy);
  border: 1px solid var(--htb-line);
}

@media (max-width: 720px) {
  .how-to-buy__table-shell {
    padding: 10px;
    border-radius: 16px;
  }

  .how-to-buy__compare-title h2 {
    font-size: 1.05rem;
  }
}
