/* =========================================================================
   صفحه‌ی راهنمای خرید (page-buying-guide.php + assets/js/page-buying-guide.js)
   فقط روی همین قالب لود می‌شود. وابسته به Tailwind نیست.
   ========================================================================= */
.rg {
  --rg-b: var(--rg-burgundy, #4e0000);
  --rg-n: var(--rg-navy, #13273f);
  --rg-nd: var(--rg-navy-deep, #0d1b2e);
  --rg-iv: var(--rg-cream, #fdfbf7);
  --rg-e: var(--rg-ease, cubic-bezier(.16, 1, .3, 1));
  max-width: 760px; margin: 0 auto; padding: 14px 12px 120px;
  font-family: 'Noto Naskh Arabic', Tahoma, sans-serif; color: var(--rg-n); text-align: right;
}
.rg *, .rg *::before, .rg *::after { box-sizing: border-box; }
.rg h1, .rg h2, .rg h3, .rg p { margin: 0; }
.rg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.rg-glass {
  border: 1px solid rgba(255, 255, 255, .72);
  background: rgba(232, 240, 248, .5);
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92), 0 18px 40px -22px rgba(28, 48, 76, .42);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .rg-glass { background: rgba(242, 243, 246, .96); }
}
.rg-ivory {
  background: var(--rg-iv); border: 1px solid rgba(19, 39, 63, .05);
  box-shadow: 0 22px 34px -20px rgba(19, 39, 63, .55), inset 0 1px 0 #fff;
}
.rg-brand { font-weight: 800; color: var(--rg-b); }
.rg-link {
  display: inline; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--rg-b);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.rg-link:focus-visible, .rg-btn:focus-visible, .rg-toc a:focus-visible, .rg-track__n:focus-visible, .rg-table summary:focus-visible, .rg-cta:focus-visible {
  outline: 2px solid var(--rg-b); outline-offset: 3px;
}

/* ---------- کادر بالا ---------- */
.rg-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 30px 22px 50px; border-radius: 30px; color: var(--rg-iv);
  background: linear-gradient(165deg, #6a0a14, #4e0000 55%, #2c0207);
  box-shadow: 0 30px 50px -26px rgba(78, 0, 0, .8);
}
.rg-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 6px);
}
.rg-hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.rg-hero.has-img::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(165deg, rgba(106, 10, 20, .82), rgba(78, 0, 0, .78) 55%, rgba(44, 2, 7, .9));
}
.rg-hero__logo { display: inline-block; font-family: 'Playfair Display', 'Noto Naskh Arabic', serif; font-size: 15px; letter-spacing: .3em; color: inherit; opacity: .78; text-decoration: none; direction: ltr; }
.rg-hero__title { margin-top: 14px; font-size: 27px; font-weight: 800; line-height: 1.5; }
.rg-hero__sub { margin-top: 8px; max-width: 30em; font-size: 12px; line-height: 2; opacity: .86; }

/* ---------- پرش به بخش‌ها ---------- */
.rg-toc {
  position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  margin: -28px 10px 0; padding: 8px; border-radius: 20px;
}
.rg-toc a {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 14px;
  font-size: 11px; font-weight: 700; color: var(--rg-b); text-decoration: none; -webkit-tap-highlight-color: transparent;
  transition: background-color .3s ease, color .3s ease;
}
.rg-toc a svg { width: 18px; height: 18px; }
.rg-toc a.is-on { background: var(--rg-b); color: var(--rg-iv); box-shadow: 0 8px 16px -8px rgba(78, 0, 0, .8); }

/* ---------- عنوان بخش‌ها ---------- */
.rg-sec { scroll-margin-top: 90px; }
.rg-hd h2[id] { scroll-margin-top: 90px; } /* لینک مستقیم به بخش‌ها (مثلاً از تماس با ما) زیر هدر نرود */
.rg-hd { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin: 30px 6px 12px; }
.rg-hd h2 { font-size: 18px; font-weight: 800; color: var(--rg-b); }
.rg-hd__aside { font-size: 10.5px; color: rgba(19, 39, 63, .6); }

/* ---------- مسیر خرید ---------- */
.rg-road { border-radius: 26px; padding: 18px 14px; }
.rg-track { position: relative; display: flex; justify-content: space-between; margin: 4px 4px 16px; }
.rg-track__line { position: absolute; top: 16px; right: 16px; left: 16px; height: 2px; background: rgba(78, 0, 0, .15); z-index: 0; }
.rg-track__line i { position: absolute; top: 0; right: 0; bottom: 0; width: var(--rg-p, 0%); background: var(--rg-b); transition: width .5s var(--rg-e); }
.rg-track__n {
  position: relative; z-index: 1; width: 34px; height: 34px; padding: 0; border-radius: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font: inherit; font-size: 13px; font-weight: 800; color: var(--rg-b);
  background: var(--rg-iv); border: 1.5px solid rgba(78, 0, 0, .3);
  transition: background-color .3s ease, color .3s ease, box-shadow .3s ease, border-color .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.rg-track__n.is-done { background: var(--rg-b); color: var(--rg-iv); border-color: var(--rg-b); }
.rg-track__n.is-cur { background: var(--rg-b); color: var(--rg-iv); border-color: var(--rg-b); box-shadow: 0 0 0 5px rgba(78, 0, 0, .15); }

.rg-steps { touch-action: pan-y; }
.rg-step { padding: 14px; border-radius: 18px; background: #fff; border: 1px solid rgba(19, 39, 63, .07); }
.rg-step + .rg-step { margin-top: 10px; }
.rg.is-js .rg-step + .rg-step { margin-top: 0; }
.rg.is-js .rg-step[hidden] { display: none; }
.rg-step.is-in { animation: rgStepIn .45s var(--rg-e); }
.rg-step.is-in.from-prev { animation-name: rgStepInPrev; }
@keyframes rgStepIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes rgStepInPrev { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.rg-step__k { font-size: 10px; font-weight: 700; color: var(--rg-b); }
.rg-step__t { margin-top: 4px; font-size: 15px; font-weight: 800; color: var(--rg-nd); }
.rg-step__p { margin-top: 6px; font-size: 12px; line-height: 2.05; color: rgba(19, 39, 63, .84); }
.rg-step__nav { display: flex; justify-content: space-between; margin-top: 12px; }
.rg-step__nav[hidden] { display: none; }

/* ---------- دکمه‌ها ---------- */
.rg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px;
  padding: 8px 16px; border: 0; border-radius: 99px; cursor: pointer;
  font: inherit; font-size: 11.5px; font-weight: 700; -webkit-tap-highlight-color: transparent;
  transition: transform .3s var(--rg-e), opacity .3s ease;
}
.rg-btn:active { transform: scale(.96); }
.rg-btn[disabled] { opacity: .45; cursor: default; transform: none; }
.rg-btn--navy { color: var(--rg-iv); background: linear-gradient(160deg, #1d3554, var(--rg-nd) 60%, #081321); box-shadow: 0 10px 18px -10px rgba(9, 20, 34, .8); }
.rg-btn--soft { color: var(--rg-n); background: rgba(19, 39, 63, .06); }

/* ---------- اتاق پرو ---------- */
.rg-fit { border-radius: 26px; padding: 18px; }
.rg-fit__t { font-size: 15px; font-weight: 800; color: var(--rg-nd); }
.rg-fit__p { margin-top: 4px; font-size: 11px; line-height: 1.85; color: rgba(19, 39, 63, .7); }
.rg-fit__in { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.rg-field {
  display: block; padding: 10px 12px 8px; border-radius: 16px; background: #fff; cursor: text;
  border: 1.5px solid rgba(19, 39, 63, .1); transition: border-color .25s ease, box-shadow .25s ease;
}
.rg-field:focus-within { border-color: var(--rg-b); box-shadow: 0 0 0 3px rgba(78, 0, 0, .08); }
.rg-field.is-bad { border-color: #b3261e; }
.rg-field__l { display: block; font-size: 10.5px; color: rgba(19, 39, 63, .65); }
.rg-field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: 2px; }
.rg-field input {
  width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 20px; font-weight: 800; color: var(--rg-nd);
}
.rg-field input::placeholder { color: rgba(19, 39, 63, .25); }
.rg-field em { flex: 0 0 auto; font-style: normal; font-size: 10px; color: rgba(19, 39, 63, .5); }
.rg-field__h { display: block; margin-top: 2px; font-size: 9.5px; line-height: 1.6; color: rgba(19, 39, 63, .5); }

.rg-res {
  display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 14px; border-radius: 20px;
  color: var(--rg-iv); background: linear-gradient(160deg, #1d3554, var(--rg-nd) 60%, #081321);
  box-shadow: 0 14px 24px -14px rgba(9, 20, 34, .8);
}
.rg-res__s {
  flex: 0 0 78px; height: 78px; border-radius: 20px; background: var(--rg-iv); color: var(--rg-b);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.rg-res__s b { font-size: 26px; line-height: 1.2; direction: ltr; }
.rg-res__s small { font-size: 10px; }
.rg-res__s.is-pop { animation: rgPop .45s var(--rg-e); }
@keyframes rgPop { 0% { transform: scale(.85); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.rg-res__p { font-size: 11.5px; line-height: 1.9; }
.rg-res__p b { color: #fff; }

.rg-scale { display: flex; gap: 4px; margin-top: 12px; }
.rg-scale span {
  flex: 1; padding: 6px 0; border-radius: 9px; text-align: center; font-size: 10px;
  color: rgba(19, 39, 63, .7); background: rgba(19, 39, 63, .06); transition: background-color .3s ease, color .3s ease;
}
.rg-scale span.is-on { background: var(--rg-b); color: var(--rg-iv); }

.rg-save { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.rg-save[hidden] { display: none; }
.rg-save__msg { font-size: 11px; font-weight: 700; }
.rg-save__msg.is-ok { color: #2f6b4f; }
.rg-save__msg.is-err { color: #b3261e; }

.rg-table { margin-top: 12px; border-radius: 14px; background: rgba(78, 0, 0, .05); }
.rg-table summary {
  display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border-radius: 14px;
  list-style: none; cursor: pointer; font-size: 11.5px; font-weight: 700; color: var(--rg-b);
}
.rg-table summary::-webkit-details-marker { display: none; }
.rg-table summary span { transition: transform .3s var(--rg-e); }
.rg-table[open] summary span { transform: rotate(180deg); }
.rg-table__wrap { overflow-x: auto; padding: 0 6px 8px; -webkit-overflow-scrolling: touch; }
.rg-table table { width: 100%; border-collapse: collapse; font-size: 10.5px; text-align: center; white-space: nowrap; background: #fff; border-radius: 12px; overflow: hidden; }
.rg-table th, .rg-table td { padding: 9px 5px; }
.rg-table thead th { background: var(--rg-b); color: var(--rg-iv); font-weight: 700; font-size: 10px; }
.rg-table tbody tr + tr th, .rg-table tbody tr + tr td { border-top: 1px solid rgba(19, 39, 63, .06); }
.rg-table tbody th { font-weight: 800; color: var(--rg-b); }
.rg-table tbody tr.is-me th, .rg-table tbody tr.is-me td { background: rgba(78, 0, 0, .08); }
.rg-table tbody tr.is-me th { background: var(--rg-b); color: var(--rg-iv); }

/* ---------- بسته‌بندی ---------- */
.rg-pack { display: flex; gap: 8px; }
.rg-pack__card { flex: 1; min-width: 0; border-radius: 22px; overflow: hidden; }
.rg-pack__card--box { color: var(--rg-iv); background: linear-gradient(165deg, #6a0a14, #4e0000 55%, #2c0207); box-shadow: 0 22px 34px -20px rgba(78, 0, 0, .7); }
.rg-pack__ph { position: relative; aspect-ratio: 4 / 3.4; overflow: hidden; }
.rg-pack__ph--paper { background: repeating-linear-gradient(100deg, rgba(150, 120, 80, .07) 0 1px, transparent 1px 5px), linear-gradient(160deg, #f6efe3, #e9dcc6); }
.rg-pack__ph--box { background: radial-gradient(120% 95% at 50% 30%, #520a17, #2f050c); }
.rg-pack__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rg-pack__tx { padding: 12px 14px 14px; }
.rg-pack__tx h3 { font-size: 13px; font-weight: 800; color: var(--rg-nd); }
.rg-pack__card--box .rg-pack__tx h3 { color: var(--rg-iv); }
.rg-pack__tx p { margin-top: 3px; font-size: 10.5px; line-height: 1.8; color: rgba(19, 39, 63, .78); }
.rg-pack__card--box .rg-pack__tx p { color: rgba(253, 251, 247, .85); }
.rg-pack__card--box .rg-brand { color: inherit; }

/* ارسال محرمانه: کارت سرمه‌ای برجسته، جدا از کارت‌های بسته‌بندی */
.rg-priv {
  position: relative; overflow: hidden; display: flex; gap: 14px; align-items: center;
  margin-top: 18px; padding: 18px; border-radius: 22px; color: var(--rg-iv);
  background: linear-gradient(160deg, #1d3554, var(--rg-nd) 60%, #081321);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 22px 34px -18px rgba(9, 20, 34, .85), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.rg-priv::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 6px);
}
.rg-priv__ic {
  position: relative; flex: 0 0 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--rg-iv); color: var(--rg-b);
  box-shadow: 0 10px 18px -10px rgba(0, 0, 0, .6);
}
.rg-priv__ic svg { width: 26px; height: 26px; }
.rg-priv__tx { position: relative; }
.rg-priv__tx h3 { font-size: 14px; font-weight: 800; color: var(--rg-iv); }
.rg-priv__tx p { margin-top: 4px; font-size: 11.5px; line-height: 1.9; color: rgba(253, 251, 247, .82); }

.rg-cta {
  display: block; margin: 26px 0 0; padding: 15px; border-radius: 99px; text-align: center; text-decoration: none;
  font-size: 13px; font-weight: 800; color: var(--rg-iv);
  background: linear-gradient(160deg, #1d3554, var(--rg-nd) 60%, #081321); box-shadow: 0 14px 24px -12px rgba(9, 20, 34, .8);
  transition: transform .3s var(--rg-e);
}
.rg-cta:active { transform: scale(.98); }

@media (min-width: 768px) {
  .rg { padding-top: 24px; }
  .rg-hero { padding: 40px 36px 60px; }
  .rg-hero__title { font-size: 34px; }
  .rg-toc { margin: -30px 40px 0; }
  .rg-fit__in { grid-template-columns: repeat(4, 1fr); }
  .rg-table table { font-size: 12px; }
  .rg-pack__ph { aspect-ratio: 16 / 10; }
}
@media (hover: hover) {
  .rg-toc a:not(.is-on):hover { background: rgba(255, 255, 255, .6); }
  .rg-track__n:not(.is-cur):hover { border-color: var(--rg-b); }
}
@media (prefers-reduced-motion: reduce) {
  .rg *, .rg *::before, .rg *::after { animation: none !important; transition: none !important; }
}
