/* =========================================================================
   RHÉA — استایل‌های کوچک سراسری (روی همه‌ی صفحات؛ از inc/home.php لود می‌شود)
   ========================================================================= */

/* ---------- فوتر: ستون لینک‌ها مرتب، با عنوان، دکمه‌ی بالا جدا ---------- */
.rhea-frosted-footer-container > div.flex {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px !important;
  row-gap: 22px;
  max-width: 340px;
  margin: 0 auto;
  direction: rtl;
  text-align: right !important;
}
.rhea-frosted-footer-container > div.flex > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px !important;
}
.rhea-frosted-footer-container > div.flex > div::before {
  display: block;
  margin-bottom: 4px;
  padding-bottom: 7px;
  font-size: 12.5px;
  font-weight: 800;
  color: #4e0000;
  border-bottom: 1px solid rgba(197, 160, 89, 0.55);
}
.rhea-frosted-footer-container > div.flex > div:nth-of-type(1)::before { content: 'خانه‌ی RHÉA'; }
.rhea-frosted-footer-container > div.flex > div:nth-of-type(2)::before { content: 'راهنما و خدمات'; }

.rhea-frosted-footer-container > div.flex a {
  position: relative;
  font-size: 12.5px;
  line-height: 1.7;
  color: #13273f;
  text-decoration: none;
  transition: color 0.3s ease;
}
.rhea-frosted-footer-container > div.flex a::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.rhea-frosted-footer-container > div.flex a:hover { color: #4e0000; }
.rhea-frosted-footer-container > div.flex a:hover::after { transform: scaleX(1); }

.rhea-frosted-footer-container .scroll-top-btn {
  grid-column: 1 / -1;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(78, 0, 0, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #4e0000;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(78, 0, 0, 0.1);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, color 0.3s ease;
}
.rhea-frosted-footer-container .scroll-top-btn:hover { transform: translateY(-3px); background: #4e0000; color: #fff; }
.rhea-frosted-footer-container .scroll-top-btn:focus-visible { outline: 2px solid #4e0000; outline-offset: 3px; }

.rhea-frosted-footer-container .footer-copyright {
  margin-top: 4px;
  font-family: 'Playfair Display', 'Noto Naskh Arabic', serif;
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-align: center;
  color: rgba(19, 39, 63, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .rhea-frosted-footer-container > div.flex a::after,
  .rhea-frosted-footer-container .scroll-top-btn { transition: none; }
}

/* =========================================================================
   فوتر: آیکون‌ها در مدال زرشکی با حلقه‌ی طلایی
   ========================================================================= */
.footer-glass-btn-lux {
  gap: 10px !important;
  padding: 7px 16px 7px 8px !important;
  border: 1px solid rgba(197, 160, 89, 0.28) !important;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.footer-glass-btn-lux:hover {
  border-color: rgba(197, 160, 89, 0.7) !important;
  box-shadow: 0 10px 22px -10px rgba(78, 0, 0, 0.35) !important;
  transform: translateY(-2px);
}
.footer-glass-btn-lux svg,
.footer-glass-btn-lux::before {
  box-sizing: content-box;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  padding: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #7d1622 0%, #4e0000 72%);
  color: #f1dfb6;
  box-shadow: inset 0 0 0 1px rgba(233, 211, 168, 0.6), 0 4px 10px rgba(78, 0, 0, 0.28);
}
.footer-glass-btn-lux svg { stroke-width: 1.7; }
.footer-glass-btn-lux:hover svg,
.footer-glass-btn-lux:hover::before { box-shadow: inset 0 0 0 1px rgba(233, 211, 168, 0.95), 0 6px 14px rgba(78, 0, 0, 0.35); }
/* اینستاگرام آیکون نداشت */
.footer-glass-btn-lux[href*="instagram.com"]::before {
  content: '';
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f1dfb6' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.3' cy='6.7' r='.6' fill='%23f1dfb6'/%3E%3C/svg%3E") center / 14px no-repeat,
    radial-gradient(circle at 35% 28%, #7d1622 0%, #4e0000 72%);
}

/* =========================================================================
   فوتر در دسکتاپ: تمام‌عرض، سه ستون
   ========================================================================= */
@media (min-width: 1024px) {
  footer.rhea-frosted-footer-container {
    display: grid !important;
    grid-template-columns: 1fr 1.3fr 1fr;
    align-items: start;
    column-gap: 56px;
    width: 100%;
    max-width: none !important;
    margin: 96px 0 0 !important;
    padding: 56px max(48px, calc((100% - 1180px) / 2)) calc(124px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 40px 40px 0 0 !important;
    direction: rtl;
  }
  footer.rhea-frosted-footer-container > .footer-divider { display: none !important; }
  footer.rhea-frosted-footer-container > :nth-child(1),
  footer.rhea-frosted-footer-container > :nth-child(5) {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin: 0 !important;
  }
  footer.rhea-frosted-footer-container > :nth-child(1) { grid-column: 1; grid-row: 1; }
  footer.rhea-frosted-footer-container > div.flex { grid-column: 2; grid-row: 1; max-width: 420px; }
  footer.rhea-frosted-footer-container > :nth-child(5) { grid-column: 3; grid-row: 1; }
  footer.rhea-frosted-footer-container .footer-glass-btn-lux { flex: none !important; justify-content: flex-start !important; font-size: 12px !important; }
  footer.rhea-frosted-footer-container .footer-copyright {
    grid-column: 1 / -1;
    margin-top: 40px;
    padding-top: 26px;
    border-top: 1px solid rgba(78, 0, 0, 0.1);
  }
}

/* =========================================================================
   پاپ‌آپ کالکشن‌ها: تم لیکوئید گلس (دسته‌بندی محصولات)
   ========================================================================= */
#rhea-collections-drawer.rhea-colpop {
  background: rgba(118, 128, 142, 0.34) !important;
  -webkit-backdrop-filter: blur(18px) saturate(140%) !important;
  backdrop-filter: blur(18px) saturate(140%) !important;
}

#rhea-collections-drawer .rhea-drawer-content.rhea-colpop__panel {
  --colpop-red: #4e0000;
  --colpop-row: clamp(196px, 30vh, 236px);
  --colpop-gap: 12px;
  position: relative !important;
  display: flex !important;
  flex-direction: column;
  width: 100% !important;
  max-width: min(92vw, 440px) !important;
  max-height: 92vh !important;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  border-radius: 36px !important;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.16) 48%, rgba(255, 255, 255, 0.26) 100%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
  backdrop-filter: blur(30px) saturate(180%) !important;
  box-shadow:
    0 30px 70px -20px rgba(19, 39, 63, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(255, 255, 255, 0.25),
    inset 0 0 40px rgba(255, 255, 255, 0.1) !important;
  transform: translateY(26px) scale(0.95);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}
#rhea-collections-drawer.active .rhea-colpop__panel { transform: none; opacity: 1; }

/* عنوان بالای پاپ‌آپ */
.rhea-colpop__head { padding: 30px 64px 12px; text-align: right; }
.rhea-colpop__title { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.6; color: var(--colpop-red); }

/* دکمه‌ی بستن: دایره‌ی شیشه‌ای، ضربدر قرمز دقیقاً وسط */
.rhea-colpop__panel .close-btn.rhea-colpop__close {
  z-index: 5 !important;
  top: 16px !important;
  left: 16px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0 !important;
  border: 1px solid rgba(78, 0, 0, 0.22) !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.5) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 12px rgba(78, 0, 0, 0.12);
  color: var(--colpop-red) !important;
  opacity: 1 !important;
  line-height: 0 !important;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.rhea-colpop__panel .close-btn.rhea-colpop__close svg { display: block; width: 16px; height: 16px; }
.rhea-colpop__panel .close-btn.rhea-colpop__close:hover { background: var(--colpop-red) !important; color: #fff !important; transform: rotate(90deg); }

/* گرید: دقیقاً ۴ کارت دیده شود، بقیه با اسکرول */
.rhea-colpop__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: var(--colpop-row);
  gap: var(--colpop-gap);
  max-height: calc(var(--colpop-row) * 2 + var(--colpop-gap) + 12px);
  padding: 6px 14px;
  overflow-y: auto;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.rhea-colpop__grid::-webkit-scrollbar { display: none; }

/* کارت شیشه‌ای */
.rhea-colpop__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-width: 0;
  padding: 10px 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.14));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -10px 24px rgba(255, 255, 255, 0.06),
    0 10px 24px -14px rgba(19, 39, 63, 0.3);
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease;
}

/* عکس تمام‌قد، بدون برش */
.rhea-colpop__media {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
}
.rhea-colpop__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 6px;
  box-sizing: border-box;
  object-fit: contain;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.rhea-colpop__mono {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', 'Noto Naskh Arabic', serif;
  font-style: italic;
  font-size: 46px;
  color: rgba(78, 0, 0, 0.35);
}

/* نام و تعداد روبه‌روی هم */
.rhea-colpop__info { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 4px; }
.rhea-colpop__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.5;
  color: var(--colpop-red);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rhea-colpop__count { flex: 0 0 auto; font-size: 15px; font-weight: 700; color: var(--colpop-red); white-space: nowrap; }

.rhea-colpop__card:hover { transform: translateY(-3px); background: linear-gradient(160deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.22)); }
.rhea-colpop__card:hover .rhea-colpop__img { transform: scale(1.04); }
.rhea-colpop__card:focus-visible { outline: 2px solid var(--colpop-red); outline-offset: 3px; }

#rhea-collections-drawer.active .rhea-colpop__card { animation: rheaColpopIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards; animation-delay: calc(0.12s + var(--i, 0) * 60ms); }
@keyframes rheaColpopIn {
  from { opacity: 0; transform: translate3d(0, 24px, 0) scale(0.94); }
  to   { opacity: 1; transform: none; }
}

/* نوار اسکرول قلب: هم‌رنگ قرمز برند */
#rhea-collections-drawer .rhea-hs__track { background: rgba(78, 0, 0, 0.12); box-shadow: inset 0 0 0 1px rgba(78, 0, 0, 0.08); }
#rhea-collections-drawer .rhea-hs__thumb { filter: drop-shadow(0 3px 6px rgba(78, 0, 0, 0.45)); }
#rhea-collections-drawer .rhea-hs__thumb path { fill: #4e0000; }

/* دکمه‌ی پایین: قرمز با موشن کلیک */
.rhea-colpop__foot { display: flex; justify-content: center; padding: 14px 18px 20px; }
.rhea-colpop__all {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: linear-gradient(160deg, #6a0a0a 0%, #4e0000 55%, #3a0000 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 26px -10px rgba(78, 0, 0, 0.55);
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, filter 0.3s ease;
}
.rhea-colpop__all:hover { filter: brightness(1.12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 16px 30px -10px rgba(78, 0, 0, 0.6); }
.rhea-colpop__all:active { transform: scale(0.96); }
.rhea-colpop__all:focus-visible { outline: 2px solid #4e0000; outline-offset: 3px; }
.rhea-colpop__all::after {
  content: '';
  position: absolute;
  top: var(--ry, 50%);
  left: var(--rx, 50%);
  z-index: -1;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
}
.rhea-colpop__all.is-pressed { animation: rheaColpopPress 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
.rhea-colpop__all.is-pressed::after { animation: rheaColpopRipple 0.6s ease-out; }
@keyframes rheaColpopPress {
  0%   { transform: scale(1); }
  35%  { transform: scale(0.94); }
  70%  { transform: scale(1.03); }
  100% { transform: scale(1); }
}
@keyframes rheaColpopRipple {
  from { opacity: 0.7; transform: scale(0); }
  to   { opacity: 0; transform: scale(18); }
}

.rhea-colpop__empty { grid-column: 1 / -1; padding: 30px 10px; text-align: center; font-size: 12px; color: #4e0000; }

/* مرورگرهایی که blur شیشه‌ای ندارند: پس‌زمینه‌ی مات‌تر */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  #rhea-collections-drawer .rhea-drawer-content.rhea-colpop__panel { background: rgba(240, 238, 236, 0.96) !important; }
}

@media (prefers-reduced-motion: reduce) {
  #rhea-collections-drawer .rhea-drawer-content.rhea-colpop__panel { transition: opacity 0.2s ease; transform: none; }
  #rhea-collections-drawer.active .rhea-colpop__card { animation: none; }
  .rhea-colpop__card, .rhea-colpop__img, .rhea-colpop__all { transition: none; }
  .rhea-colpop__card:hover { transform: none; }
  .rhea-colpop__all.is-pressed, .rhea-colpop__all.is-pressed::after { animation: none; }
}
