/* ==========================================================================
   JLS Computers — Wishlist
   Card hearts, header count, toast, /wishlist/ page and My Account tab.
   Uses the jls-ui tokens. "html body" prefixes out-rank the Customizer CSS.
   ========================================================================== */

/* ---------- Heart button (cards) ---------- */
html body ul.products li.product { position: relative; }
html body .jls-wl-btn {
	position: absolute; top: 12px; right: 12px; z-index: 3;
	display: grid; place-items: center; width: 36px; height: 36px; margin: 0; padding: 0;
	border: 1px solid var(--a-line) !important; border-radius: 50%;
	background: rgba(255, 255, 255, .94) !important; color: #A7B0C4 !important;
	box-shadow: 0 2px 8px rgba(21, 32, 58, .08); cursor: pointer; line-height: 1;
	transition: color .15s, border-color .15s, background .15s, transform .15s, opacity .15s;
}
html body .jls-wl-btn svg { display: block; width: 17px; height: 17px; }
html body .jls-wl-btn:hover { color: var(--a-red, #D9443A) !important; border-color: #F3C5C0 !important; }
html body .jls-wl-btn:focus-visible { outline: 2px solid var(--a-navy); outline-offset: 2px; }
html body .jls-wl-btn.is-active { background: var(--a-red, #D9443A) !important; border-color: var(--a-red, #D9443A) !important; color: #fff !important; }
html body .jls-wl-btn.is-active svg, html body .jls-pdp__wish.is-active svg { fill: currentColor; }
html body .jls-wl-btn.is-pop, html body .jls-pdp__wish.is-pop { animation: jls-wl-pop .3s ease; }
@keyframes jls-wl-pop { 40% { transform: scale(1.2); } }

/* Desktop: quiet until the card is hovered (always shown once saved). */
@media (hover: hover) and (min-width: 960px) {
	html body ul.products li.product .jls-wl-btn:not(.is-active) { opacity: 0; transform: translateY(-4px); }
	html body ul.products li.product:hover .jls-wl-btn,
	html body ul.products li.product .jls-wl-btn:focus-visible { opacity: 1; transform: none; }
}
@media (max-width: 599px) {
	html body .jls-wl-btn { top: 8px; right: 8px; width: 32px; height: 32px; }
	html body .jls-wl-btn svg { width: 15px; height: 15px; }
}

/* ---------- Header heart count ---------- */
html body .jls-header-utils a.jls-wl-head { position: relative; }
html body .jls-wl-head__count {
	position: absolute; top: -6px; right: -9px;
	min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box;
	border: 2px solid #fff; border-radius: 999px;
	background: var(--a-red, #D9443A); color: #fff;
	font: 700 10px/13px var(--jls-font, "Inter", sans-serif); text-align: center;
}
html body .jls-wl-head__count[hidden] { display: none; }

/* ---------- Toast ---------- */
.jls-wl-toast {
	position: fixed; left: 50%; bottom: 24px; z-index: 99990;
	display: flex; align-items: center; gap: 10px;
	padding: 10px 12px 10px 10px; border-radius: 14px;
	background: var(--a-ink, #15203A); color: #fff; box-shadow: 0 14px 40px rgba(21, 32, 58, .3);
	font: 500 14px/1.3 var(--jls-font, "Inter", sans-serif);
	width: max-content; max-width: calc(100vw - 32px); box-sizing: border-box; white-space: nowrap;
	opacity: 0; visibility: hidden; transform: translate(-50%, 12px);
	transition: opacity .2s, transform .2s, visibility .2s;
}
.jls-wl-toast.is-open { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.jls-wl-toast__ico { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, .12); }
.jls-wl-toast__ico svg { width: 16px; height: 16px; }
.jls-wl-toast__ico.is-on { background: var(--a-red, #D9443A); }
.jls-wl-toast__ico.is-on svg { fill: currentColor; }
.jls-wl-toast a { flex: 0 0 auto; margin-left: 6px; padding: 6px 12px; border-radius: 9px; background: #fff; color: var(--a-ink, #15203A) !important; font-weight: 700; font-size: 13px; text-decoration: none !important; }

/* ---------- Wishlist page ---------- */
html body.jls-wl-page .entry-header, html body.jls-wl-page .page-header { display: none; }
html body.jls-wl-page .inside-article { padding-top: 32px; }

.jls-wl { font-family: var(--jls-font, "Inter", sans-serif); }
.jls-wl__hero {
	display: flex; align-items: center; gap: 18px; margin: 0 0 18px; padding: 28px 30px;
	border-radius: var(--a-radius-lg, 18px); color: #fff;
	background: radial-gradient(130% 120% at 100% 0%, #2C5697 0%, #1F3361 48%, #15203A 100%);
	box-shadow: 0 10px 30px rgba(21, 32, 58, .18);
}
.jls-wl__hero-ico { flex: 0 0 auto; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: rgba(255, 255, 255, .12); }
.jls-wl__hero-ico svg { fill: currentColor; }
html body .jls-wl__hero h1 { margin: 0 0 4px; font-family: var(--jls-font-heading); font-size: 28px; font-weight: 800; line-height: 1.15; letter-spacing: var(--jls-heading-tracking, 0); text-transform: none; color: #fff; }
.jls-wl__hero p { margin: 0; max-width: 560px; font-size: 14.5px; color: #C9D3E8; }

.jls-wl__bar {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
	margin: 0 0 16px; padding: 12px 14px 12px 18px;
	background: #fff; border: 1px solid var(--a-line); border-radius: var(--a-radius, 14px); box-shadow: var(--a-shadow);
}
.jls-wl__bar[hidden] { display: none; }
.jls-wl__count { font-size: 14px; color: var(--a-muted); }
.jls-wl__count strong { color: var(--a-ink); font-size: 15px; }
.jls-wl__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.jls-wl__actions .jls-btn svg { margin-right: 2px; }

.jls-wl__guest { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 11px 14px; border-radius: 12px; background: var(--a-navy-50, #EDF2FA); color: var(--a-ink); font-size: 13.5px; }
.jls-wl__guest[hidden] { display: none; }
.jls-wl__guest svg { flex: 0 0 auto; color: var(--a-navy); }
.jls-wl__guest a { font-weight: 600; color: var(--a-navy) !important; }

.jls-wl__grid[hidden] { display: none; }
html body .jls-wl ul.products { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0 !important; padding: 0 !important; }
html body .jls-wl ul.products::before, html body .jls-wl ul.products::after { display: none !important; }
html body .jls-wl ul.products li.product { float: none !important; width: auto !important; margin: 0 !important; transition: opacity .2s, transform .2s; }
html body .jls-wl ul.products li.product .jls-wl-btn { opacity: 1 !important; transform: none !important; }
html body .jls-wl ul.products li.product.is-leaving { opacity: 0; transform: scale(.96); }
.jls-wl--account ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }

.jls-wl__empty { padding: 52px 28px; text-align: center; background: #fff; border: 1px dashed #CBD4E4; border-radius: var(--a-radius, 14px); }
.jls-wl__empty[hidden] { display: none; }
.jls-wl__empty-ico { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; background: #FDECEA; color: var(--a-red, #D9443A); }
html body .jls-wl__empty h3 { margin: 0 0 6px; font-family: var(--jls-font-heading); font-size: 19px; font-weight: 800; text-transform: none; color: var(--a-ink); }
.jls-wl__empty p { max-width: 420px; margin: 0 auto 20px; font-size: 14px; color: var(--a-muted); }

@media (max-width: 1100px) {
	html body .jls-wl ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
	.jls-wl--account ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 700px) {
	html body .jls-wl ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px; }
	.jls-wl__hero { padding: 20px; gap: 14px; }
	html body .jls-wl__hero h1 { font-size: 22px; }
	.jls-wl__hero p { font-size: 13.5px; }
	.jls-wl__bar { padding: 12px 14px; }
	.jls-wl__actions { width: 100%; }
	.jls-wl__actions .jls-btn { flex: 1 1 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	html body .jls-wl-btn, .jls-wl-toast, html body .jls-wl ul.products li.product { transition: none; animation: none; }
}
