/* =========================================================
   Black Sistem – wishlist pages
   /wishlist/            (site header chrome, dark hero)
   /dashboard/wishlist/  (dashboard chrome, .acct panel)
   Cards are the shop's own .p-card component (product_card.html / DSC.cardHTML).
   RTL, light + dark, responsive.
   ========================================================= */

/* ---------- Hero (header page) ---------- */
.wl-hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: #07051f; color: #fff; border-bottom: 1px solid rgba(139, 92, 246, .35);
}
.wl-hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 140% at 8% 20%, rgba(124, 58, 237, .55) 0, rgba(124, 58, 237, 0) 55%),
    radial-gradient(90% 120% at 92% 120%, rgba(76, 29, 149, .6) 0, rgba(6, 5, 26, 0) 60%),
    linear-gradient(90deg, #0a0820 0%, #0d0a2b 45%, #08061c 100%);
}
.wl-hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(167, 139, 250, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 139, 250, .05) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(70% 90% at 50% 50%, #000, transparent 85%);
  mask-image: radial-gradient(70% 90% at 50% 50%, #000, transparent 85%);
  opacity: .55;
}
.wl-hero__art {
  position: absolute; z-index: -1; inset-inline-end: clamp(-30px, 1vw, 40px); bottom: -22%;
  width: clamp(200px, 26vw, 380px); height: auto; pointer-events: none;
  opacity: .8; filter: drop-shadow(0 0 55px rgba(124, 58, 237, .85)) saturate(1.15);
  -webkit-mask-image: radial-gradient(72% 72% at 50% 50%, #000 58%, transparent 100%);
  mask-image: radial-gradient(72% 72% at 50% 50%, #000 58%, transparent 100%);
}
.wl-hero__in {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: center; gap: .9rem;
  min-height: clamp(170px, 19vw, 230px); padding-block: clamp(1.1rem, 2.4vw, 1.8rem);
}
.wl-hero__title { display: flex; align-items: center; gap: 1rem; }
.wl-hero__ic {
  display: grid; place-items: center; flex: none; width: 58px; height: 58px; border-radius: 18px;
  border: 1px solid rgba(167, 139, 250, .55); background: rgba(14, 11, 40, .65); color: #e2d6ff;
  box-shadow: 0 0 28px -4px rgba(139, 92, 246, .8);
}
.wl-hero__ic .i { width: 30px; height: 30px; }
.wl-hero h1 {
  font-family: var(--display); font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 400; line-height: 1.3;
  color: #fff; text-shadow: 0 0 24px rgba(139, 92, 246, .55);
}
.wl-hero__title p { margin-top: .25rem; max-width: 52ch; font-size: clamp(.82rem, 1.5vw, .98rem); line-height: 1.9; color: #ddd6ff; }

/* breadcrumb inside the dark hero */
.wl-crumbs ol {
  display: flex; align-items: center; flex-wrap: wrap; gap: .3rem;
  margin: 0; padding: 0; list-style: none; font-size: .84rem; color: #b9b0e8;
}
.wl-crumbs a {
  display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .6rem; border-radius: 99px;
  color: #d7cfff; transition: color .18s, background-color .18s;
}
.wl-crumbs a .i { color: #c4a7ff; }
.wl-crumbs a:hover { color: #fff; background: rgba(139, 92, 246, .28); }
.wl-crumbs [aria-current] { padding: .3rem .5rem; font-weight: 600; color: #fff; }
.wl-crumbs__sep { display: inline-flex; opacity: .65; }

/* ---------- Page body ---------- */
.wl-wrap { padding-block: clamp(1.2rem, 2.8vw, 2.1rem) clamp(2.4rem, 5vw, 3.6rem); }

.wl-panel {
  padding: clamp(.9rem, 2vw, 1.4rem);
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel, var(--surface));
  box-shadow: var(--shadow);
}
:root[data-theme="dark"] .wl-panel { background: linear-gradient(180deg, #0e0b28, #090720); }

/* dashboard page: .acct already is the panel, so the inner one drops its frame */
.wl-page .wl-panel { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
/* .acct__head already draws the divider, so the toolbar does not repeat it */
.wl-page .wl-panel__head { padding-bottom: 0; margin-bottom: 1rem; border-bottom: 0; }

.wl-panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-bottom: .9rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--line);
}
.wl-count { display: inline-flex; align-items: center; gap: .5rem; font-size: .95rem; color: var(--text); }
.wl-count .i { width: 20px; height: 20px; color: var(--accent); }
.wl-count b { font-size: 1.05rem; font-weight: 800; color: var(--text-strong); }
:root[data-theme="dark"] .wl-count .i { color: #c8b2ff; }

.wl-clear-box { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.wl-clear-box[hidden] { display: none; }
.wl-clear {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: .4rem .9rem;
  border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted);
  font-size: .86rem; font-weight: 500; transition: color .18s, border-color .18s, background-color .18s;
}
.wl-clear .i { width: 17px; height: 17px; }
.wl-clear:hover:not(:disabled) { color: #ff4d6d; border-color: #ff4d6d; background: rgba(255, 77, 109, .1); }
.wl-clear:disabled { opacity: .6; cursor: progress; }
.wl-clear--solid { color: #fff; border-color: #e11d48; background: #e11d48; }
.wl-clear--solid:hover:not(:disabled) { color: #fff; background: #be123c; border-color: #be123c; }
.wl-clear__ask { font-size: .86rem; color: var(--text-strong); }

/* ---------- Grid ---------- */
.wl-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.7rem, 1.4vw, 1rem);
  margin: 0; padding: 0; list-style: none;
}
.wl-grid[hidden] { display: none; }
.wl-grid > .p-card { height: 100%; }
.wl-grid .p-card__name { text-align: start; }
.wl-grid .p-card__name a {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3em;
}
.wl-grid .p-card__sub, .wl-grid .p-card__brand { text-align: start; }
.p-card.is-leaving { opacity: 0; transform: scale(.97); transition: opacity .22s, transform .22s; }

/* buy row: shop's add-to-cart button + remove icon */
.p-card__buy { display: flex; align-items: stretch; gap: .5rem; margin-top: auto; }
.p-card__buy .btn { flex: 1 1 auto; min-width: 0; margin-top: 0; }
.p-card__remove {
  flex: none; display: grid; place-items: center; width: 42px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
  transition: color .18s, border-color .18s, background-color .18s;
}
.p-card__remove .i { width: 18px; height: 18px; }
.p-card__remove:hover:not(:disabled) { color: #ff4d6d; border-color: #ff4d6d; background: rgba(255, 77, 109, .12); }
.p-card__remove:disabled { opacity: .6; cursor: progress; }

/* ---------- Skeleton ---------- */
.wl-skel {
  position: relative; overflow: hidden; min-height: 340px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
}
:root[data-theme="dark"] .wl-skel { background: linear-gradient(180deg, #120f2e, #0a0820); }
.wl-skel::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 32%, rgba(139, 92, 246, .18) 50%, transparent 68%);
  background-size: 300% 100%; animation: wl-shimmer 1.4s linear infinite;
}
@keyframes wl-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* ---------- Empty / error ---------- */
.wl-state {
  display: flex; flex-direction: column; align-items: center; gap: .55rem;
  padding: clamp(2rem, 5vw, 3.2rem) 1.2rem; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--r-md); background: var(--accent-soft);
}
.wl-state[hidden] { display: none; }
:root[data-theme="dark"] .wl-state { background: rgba(14, 11, 40, .5); }
.wl-state__ic {
  display: grid; place-items: center; width: 66px; height: 66px; margin-bottom: .3rem; border-radius: 50%;
  border: 1px solid var(--accent); background: var(--surface); color: var(--accent);
}
:root[data-theme="dark"] .wl-state__ic { color: #c8a6ff; box-shadow: 0 0 26px -8px rgba(139, 92, 246, .9); }
.wl-state__ic .i { width: 30px; height: 30px; }
.wl-state h2 { font-size: 1.12rem; font-weight: 800; color: var(--text-strong); }
.wl-state p { max-width: 44ch; font-size: .88rem; line-height: 1.95; color: var(--muted); }
.wl-state--err .wl-state__ic { border-color: #ff4d6d; color: #ff4d6d; }
.wl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; height: 46px; margin-top: .55rem;
  padding-inline: 1.3rem; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .16);
  background: var(--btn-bg); color: #fff; font-size: .9rem; font-weight: 600; white-space: nowrap;
  box-shadow: var(--btn-shadow); transition: filter .18s, transform .18s;
}
.wl-btn .i { width: 19px; height: 19px; }
.wl-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* ---------- Toast (local to these pages) ---------- */
.wl-toast-host {
  position: fixed; z-index: 300; inset-inline: 0; bottom: 1.2rem;
  display: flex; flex-direction: column; align-items: center; gap: .5rem; padding-inline: 1rem; pointer-events: none;
}
.wl-toast {
  pointer-events: auto; display: flex; align-items: center; gap: .6rem; max-width: 460px;
  padding: .8rem 1.1rem; border-radius: 12px; border: 1px solid #22c55e; background: var(--surface); color: var(--text);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .5); font-size: .9rem; animation: wl-toast-in .25s ease;
}
.wl-toast .i { width: 18px; height: 18px; color: #22c55e; }
.wl-toast--err { border-color: #ff4d6d; }
.wl-toast--err .i { color: #ff4d6d; }
@keyframes wl-toast-in { from { opacity: 0; transform: translateY(8px); } }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .wl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .wl-hero__in { min-height: 0; gap: .7rem; }
  .wl-hero__art { width: clamp(150px, 34vw, 230px); bottom: -14%; opacity: .55; inset-inline-end: -10px; }
  .wl-hero__ic { width: 48px; height: 48px; border-radius: 14px; }
  .wl-hero__ic .i { width: 24px; height: 24px; }
  .wl-hero__title { gap: .7rem; }
  .wl-count, .wl-clear { font-size: .84rem; }
  .wl-skel { min-height: 280px; }
}

@media (max-width: 560px) {
  .wl-panel__head { flex-wrap: wrap; gap: .6rem; }
  .wl-clear-box { width: 100%; justify-content: flex-end; }
  .wl-clear__ask { width: 100%; }
  .wl-grid { gap: .6rem; }
  .wl-grid .p-card { padding: 9px 9px 11px; }
  .wl-grid .p-card__name { font-size: .86rem; }
  .wl-grid .p-card__price strong { font-size: .92rem; }
  .p-card__buy { gap: .35rem; }
  .p-card__buy .btn { padding-inline: .4rem; font-size: .76rem; white-space: nowrap; }
  .p-card__buy .btn .i { display: none; }
  .p-card__remove { width: 38px; }
}

@media (max-width: 400px) {
  .wl-grid { grid-template-columns: minmax(0, 1fr); }
  .wl-hero__art { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wl-skel::after, .wl-toast { animation: none; }
  .p-card.is-leaving { transition: none; }
}


/* ================= Hero fix: عکس، متن و ریسپانسیو (آخر فایل بگذارید) ================= */
.wl-hero { --wl-art-h: 135%; --wl-art-o: .92; }      /* برای تنظیم دستی: ارتفاع و شفافیت عکس */

/* عکس: چسبیده به لبه، هم‌اندازه با ارتفاع هیرو، با محو شدن نرم به سمت متن */
.wl-hero__art {
  top: 50%; bottom: auto; inset-inline-end: 0;
  width: auto; max-width: none; height: var(--wl-art-h); aspect-ratio: 378 / 312;
  object-fit: cover; transform: translateY(-50%);
  opacity: var(--wl-art-o); filter: saturate(1.12);
  -webkit-mask-image: radial-gradient(ellipse 82% 95% at 18% 50%, #000 38%, rgba(0, 0, 0, .55) 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 82% 95% at 18% 50%, #000 38%, rgba(0, 0, 0, .55) 62%, transparent 100%);
}

/* لایه‌ی تیره کنار متن تا هیچ‌جا زیر عکس خوانایی کم نشود */
.wl-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(to left, rgba(7, 5, 31, .92) 0, rgba(7, 5, 31, .78) 38%, rgba(7, 5, 31, 0) 78%);
}

/* متن: بدون کلمه‌ی تنها در خط آخر */
.wl-hero__title > div { min-width: 0; }
.wl-hero h1 { text-wrap: balance; }
.wl-hero__title p { max-width: 60ch; text-wrap: balance; }

/* ریسپانسیو */
@media (min-width: 1500px) { .wl-hero { --wl-art-h: 150%; } }
@media (max-width: 1100px) { .wl-hero { --wl-art-h: 122%; --wl-art-o: .8; } }

@media (max-width: 767px) {
  .wl-hero { --wl-art-h: 108%; --wl-art-o: .5; }
  .wl-hero__art { width: auto; bottom: auto; inset-inline-end: -4%; }
  .wl-hero::before { background: linear-gradient(to left, rgba(7, 5, 31, .94) 0, rgba(7, 5, 31, .82) 55%, rgba(7, 5, 31, .55) 100%); }
  .wl-hero__in { padding-block: 1rem 1.1rem; }
  .wl-hero__title p { max-width: none; }
}

@media (max-width: 400px) {
  .wl-hero { --wl-art-h: 96%; --wl-art-o: .3; }
  .wl-hero__art { display: block; }            /* قبلاً مخفی می‌شد؛ حالا کم‌رنگ می‌ماند */
  .wl-hero__title { align-items: flex-start; }
  .wl-hero__ic { width: 44px; height: 44px; border-radius: 12px; }
  .wl-hero h1 { font-size: 1.5rem; }
}