/* =========================================================================
   مقایسه‌ی محصولات RHÉA — inc/compare.php ، assets/js/rhea-compare.js
   ========================================================================= */

/* ---------- آیکون روی کارت‌ها (زیر قلب) ----------
   هم‌وزن قلب: خطی و سفید با سایه‌ی نرم روی عکس، بدون دایره‌ی سفید (فقط وقتی انتخاب شده دایره‌ی سرمه‌ای) */
.rhea-cmp-btn {
  position: absolute; z-index: 3; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: #fff;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .35));
  transition: background-color .3s ease, color .3s ease, transform .3s ease;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.rhea-cmp-btn::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
.rhea-cmp-btn svg { display: block; width: 18px; height: 18px; overflow: visible; }
.rhea-cmp-btn:active { transform: scale(.88); }
.rhea-cmp-btn.is-on { background: rgba(19, 39, 63, .86); color: #fdfbf7; filter: drop-shadow(0 4px 8px rgba(19, 39, 63, .45)); }
.rhea-cmp-btn.is-on svg { width: 15px; height: 15px; }
.rhea-cmp-btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
/* جای آیکون در هر نوع کارت: درست زیر قلب */
.rhea-gcard .rhea-cmp-btn { top: 44px; left: 11px; }
.rhea-gcard--shop .rhea-cmp-btn { top: 45px; left: 12px; }
.rhea-sx__card .rhea-cmp-btn { top: 44px; right: 9px; }
/* گالری صفحه‌ی محصول: هم‌شکل دکمه‌ی بزرگ‌نمایی (دایره‌ی شیشه‌ای ۳۸px) */
.rhea-sp-gal .rhea-cmp-btn {
  top: 100px; left: 12px; z-index: 4; width: 38px; height: 38px; filter: none;
  border: 1px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.rhea-sp-gal .rhea-cmp-btn svg { width: 16px; height: 16px; }
.rhea-sp-gal .rhea-cmp-btn.is-on { background: rgba(19, 39, 63, .86); border-color: rgba(19, 39, 63, .86); }
.rhea-cmp-btn--inline { position: relative; top: auto; left: auto; right: auto; }

/* ---------- نوار شناور ---------- */
.rcmp-bar {
  position: fixed; z-index: 9990; right: 12px; left: 12px; bottom: 92px; margin: 0 auto; max-width: 440px;
  display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 10px; border-radius: 999px; direction: rtl;
  font-family: 'Noto Naskh Arabic', Tahoma, sans-serif; color: #13273f;
  background: linear-gradient(160deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .74));
  border: 1px solid #fff; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 18px 30px -16px rgba(19, 39, 63, .6);
  animation: rcmp-up .5s cubic-bezier(.16, 1, .3, 1);
}
.rcmp-bar[hidden] { display: none; }
@keyframes rcmp-up { from { opacity: 0; transform: translateY(14px); } }
.rcmp-bar.is-shake { animation: rcmp-shake .45s ease; }
@keyframes rcmp-shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.rcmp-bar__th { display: flex; flex: 0 0 auto; padding-right: 4px; }
.rcmp-bar__th img, .rcmp-bar__th i { width: 34px; height: 34px; margin-left: -10px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; background: #f1ece4; display: block; }
.rcmp-bar__th img:last-child, .rcmp-bar__th i:last-child { margin-left: 0; }
.rcmp-bar__t { flex: 1; min-width: 0; margin: 0; font-size: 12px; line-height: 1.6; }
.rcmp-bar__t b { display: block; font-weight: 800; }
.rcmp-bar__t small { display: block; font-size: 10.5px; font-weight: 600; color: rgba(19, 39, 63, .55); }
.rcmp-bar.is-warn .rcmp-bar__t small { color: #4e0000; font-weight: 800; }
.rcmp-bar__clear { flex: 0 0 auto; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(19, 39, 63, .06); color: #13273f; font-size: 12px; cursor: pointer; }
.rcmp-bar__go { flex: 0 0 auto; height: 38px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer; background: #13273f; color: #fdfbf7; font: inherit; font-size: 12px; font-weight: 800; }
.rcmp-bar__go[disabled] { background: rgba(19, 39, 63, .12); color: rgba(19, 39, 63, .6); cursor: default; font-size: 11px; }
@media (min-width: 1024px) { .rcmp-bar { bottom: 104px; } }

/* ---------- پاپ‌آپ ---------- */
html.rcmp-lock { overflow: hidden; }
.rcmp { position: fixed; inset: 0; z-index: 99990; direction: rtl; font-family: 'Noto Naskh Arabic', Tahoma, sans-serif; color: #13273f; }
.rcmp[hidden] { display: none; }
.rcmp__dim { position: absolute; inset: 0; background: rgba(236, 232, 225, .4); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transition: opacity .3s ease; }
.rcmp__pop {
  position: absolute; inset: 24px 8px 8px; margin: 0 auto; max-width: 1020px; display: flex; flex-direction: column; overflow: hidden; outline: none;
  border-radius: 28px; background: linear-gradient(160deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .74));
  border: 1px solid #fff; -webkit-backdrop-filter: blur(26px); backdrop-filter: blur(26px);
  box-shadow: inset 0 1px 0 #fff, 0 40px 80px -40px rgba(19, 39, 63, .75);
  opacity: 0; transform: translateY(18px) scale(.985); transition: opacity .35s ease, transform .5s cubic-bezier(.16, 1, .3, 1);
}
.rcmp.is-in .rcmp__dim { opacity: 1; }
.rcmp.is-in .rcmp__pop { opacity: 1; transform: none; }
@media (min-width: 768px) { .rcmp__pop { inset: 40px 24px; } }
.rcmp__h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 8px; }
.rcmp__h h2 { margin: 0; font-size: 18px; font-weight: 800; color: #4e0000; }
.rcmp__h small { display: block; margin-top: 2px; font-size: 11px; font-weight: 600; color: rgba(19, 39, 63, .55); }
.rcmp__x { flex: 0 0 auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(19, 39, 63, .06); color: #13273f; font-size: 15px; cursor: pointer; }
.rcmp__tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 18px 10px; border-bottom: 1px solid rgba(19, 39, 63, .09); }
.rcmp__tog { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; cursor: pointer; }
.rcmp__tog input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rcmp__sw { position: relative; width: 38px; height: 22px; border-radius: 99px; background: rgba(19, 39, 63, .2); transition: background-color .3s ease; }
.rcmp__sw::after { content: ''; position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.rcmp__tog input:checked + .rcmp__sw { background: #13273f; }
.rcmp__tog input:checked + .rcmp__sw::after { transform: translateX(-16px); }
.rcmp__tog input:focus-visible + .rcmp__sw { outline: 2px solid #4e0000; outline-offset: 2px; }
.rcmp__clear { border: 0; background: none; color: #4e0000; font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.rcmp__body { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.rcmp__empty { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 40px 20px; font-size: 13px; color: rgba(19, 39, 63, .65); text-align: center; }
.rcmp__spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(78, 0, 0, .18); border-top-color: #4e0000; animation: rcmp-spin .8s linear infinite; }
@keyframes rcmp-spin { to { transform: rotate(360deg); } }

/* جدول: موبایل — ستون‌های ۱۵۰px با کشیدن افقی؛ عنوان هر ردیف بالای مقدارها */
.rcmp__grid { display: grid; grid-template-columns: repeat(var(--n), minmax(150px, 1fr)); min-width: calc(var(--n) * 150px); }
.rcmp__lab { grid-column: 1 / -1; position: sticky; right: 0; padding: 8px 14px; font-size: 11px; font-weight: 800; color: rgba(19, 39, 63, .7); background: rgba(19, 39, 63, .035); border-top: 1px solid rgba(19, 39, 63, .08); }
.rcmp__lab--head { display: none; }
.rcmp__cell { padding: 10px 10px; font-size: 12px; line-height: 1.85; text-align: center; overflow-wrap: anywhere; }
.rcmp__cell.is-diff { background: rgba(78, 0, 0, .03); }
.rcmp.is-diff-only .is-same { display: none; }
@media (min-width: 768px) {
  .rcmp__grid { grid-template-columns: 150px repeat(var(--n), minmax(0, 1fr)); min-width: 0; }
  .rcmp__lab { grid-column: auto; position: static; display: flex; align-items: center; padding: 10px 18px; font-size: 12px; }
  .rcmp__lab--head { display: flex; align-items: flex-end; background: none; border-top: 0; padding-bottom: 18px; }
  .rcmp__cell { padding: 11px 12px; font-size: 12.5px; border-top: 1px solid rgba(19, 39, 63, .08); }
}
.rcmp__col { position: relative; padding: 12px 10px 14px; text-align: center; }
.rcmp__img { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 18px; border: 1.5px solid #13273f; background: radial-gradient(120% 90% at 50% 20%, #fffdf9, #f1ece4 75%, #e8e1d6); }
.rcmp__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rcmp__tag { position: absolute; top: 8px; right: 8px; padding: 3px 9px; border-radius: 99px; background: #4e0000; color: #fdfbf7; font-size: 10px; font-weight: 800; }
.rcmp__rm { position: absolute; top: 20px; left: 18px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(253, 251, 247, .92); color: #13273f; font-size: 12px; cursor: pointer; box-shadow: 0 4px 10px -4px rgba(19, 39, 63, .5); }
.rcmp__name { display: block; margin-top: 10px; color: #13273f; font-size: 13px; font-weight: 800; line-height: 1.7; text-decoration: none; }
.rcmp__price { margin-top: 4px; color: #4e0000; font-size: 13px; font-weight: 800; }
.rcmp__price s { margin-right: 4px; color: rgba(19, 39, 63, .4); font-size: 11px; font-weight: 600; }
.rcmp__price.is-na { color: rgba(19, 39, 63, .5); font-size: 12px; }
.rcmp__pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 8px; }
.rcmp__pick button { min-width: 34px; height: 30px; padding: 0 8px; border-radius: 9px; border: 1px solid rgba(19, 39, 63, .15); background: rgba(255, 255, 255, .8); color: #13273f; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.rcmp__pick button.is-on { background: #13273f; color: #fdfbf7; border-color: #13273f; }
.rcmp__add { width: 100%; height: 38px; margin-top: 8px; border: 0; border-radius: 999px; cursor: pointer; background: linear-gradient(160deg, #6a0a14, #4e0000); color: #fdfbf7; font: inherit; font-size: 12px; font-weight: 800; box-shadow: 0 12px 20px -12px rgba(78, 0, 0, .9); }
.rcmp__add[disabled] { background: rgba(19, 39, 63, .12); color: rgba(19, 39, 63, .5); box-shadow: none; cursor: default; }
.rcmp__msg { display: block; min-height: 1em; margin-top: 4px; font-size: 10.5px; font-weight: 700; color: #4e0000; }
.rcmp__dot { display: inline-block; width: 13px; height: 13px; margin-left: 5px; border-radius: 50%; vertical-align: -2px; border: 1px solid rgba(19, 39, 63, .2); }
.rcmp__sz { display: inline-flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.rcmp__sz i { min-width: 30px; height: 26px; padding: 0 6px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; font-weight: 800; background: rgba(255, 255, 255, .75); border: 1px solid rgba(19, 39, 63, .12); }
.rcmp__sz i.is-out { color: rgba(19, 39, 63, .5); background: linear-gradient(to top left, transparent calc(50% - .8px), #4e0000 calc(50% - .8px), #4e0000 calc(50% + .8px), transparent calc(50% + .8px)), rgba(255, 255, 255, .5); }
.rcmp__cell .is-pos { color: #14523a; font-weight: 800; }
.rcmp__cell .is-neg { color: rgba(19, 39, 63, .45); }
@media (prefers-reduced-motion: reduce) {
  .rcmp__pop, .rcmp__dim, .rcmp-bar { transition: none; animation: none; }
}

/* داده‌ی ثبت‌نشده و خلاصه‌ی توضیح در جدول مقایسه */
.rcmp__na { font-size: 11px; font-weight: 600; font-style: normal; opacity: .75; }
.rcmp__desc { display: block; font-size: 11.5px; font-weight: 500; line-height: 1.9; color: rgba(19, 39, 63, .82); }
