/* =====================================================================
 * balOON Wishlist + Compare
 * Uses the theme tokens (--pink, --ink, --muted, --line, --chip-bg …) so
 * it follows both the dark (default) and light themes.
 * ===================================================================== */

/* ---------- Card icon buttons (all card types) ---------- */
.bl-card__wish,
.bl-card__compare {
	padding: 0;
	border: 0;
	color: #6b6580;
	background: rgba(255, 255, 255, .94);
	transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.bl-card__wish svg,
.bl-card__compare svg { width: 16px; height: 16px; fill: none; transition: fill .2s ease; }
.bl-card__wish:hover { color: var(--pink); background: #fff; transform: scale(1.08); }
.bl-card__compare:hover { color: var(--purple); background: #fff; transform: scale(1.08); }
.bl-card__wish.is-active { color: #fff; background: var(--pink); box-shadow: 0 4px 14px rgba(255, 45, 155, .45); }
.bl-card__wish.is-active svg { fill: currentColor; }
.bl-card__compare.is-active { color: #fff; background: var(--purple); box-shadow: 0 4px 14px rgba(124, 58, 237, .45); }
.bl-card__wish:focus-visible,
.bl-card__compare:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.bl-card__wish.is-busy,
.bl-card__compare.is-busy,
.bl-wlc-pill.is-busy { opacity: .6; pointer-events: none; }
.bl-card__wish.is-active svg { animation: bl-wlc-pop .35s ease; }
@keyframes bl-wlc-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* Loop cards (shop / category archives) */
li.product { position: relative; }
.bl-card__icons { position: absolute; top: 12px; right: 12px; z-index: 5; display: flex; flex-direction: column; gap: 8px; }
.bl-card__icons .bl-card__wish,
.bl-card__icons .bl-card__compare { position: static; margin: 0; width: 34px; height: 34px; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }

/* ---------- Single product pills ---------- */
.bl-wlc-single { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 18px; }
.bl-wlc-pill {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 16px; border-radius: 999px;
	background: var(--chip-bg); color: var(--ink);
	border: 1px solid var(--line);
	font: 600 13px/1.2 var(--font); cursor: pointer;
	transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.bl-wlc-pill svg { width: 17px; height: 17px; flex: 0 0 auto; }
.bl-wlc-pill:hover { border-color: rgba(255, 45, 155, .55); }
.bl-wlc-pill--wish.is-active { color: var(--pink); border-color: var(--pink); background: rgba(255, 45, 155, .1); }
.bl-wlc-pill--wish.is-active svg { fill: currentColor; }
.bl-wlc-pill--compare.is-active { color: var(--purple-2); border-color: var(--purple); background: rgba(124, 58, 237, .12); }
[data-theme="light"] .bl-wlc-pill--compare.is-active { color: var(--purple); }

/* ---------- Header badges ---------- */
.bl-badge.is-empty { opacity: .55; }

/* ---------- Shared buttons ---------- */
.bl-wlc-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 40px; padding: 9px 18px; border-radius: 10px;
	font: 700 13px/1.2 var(--font); text-decoration: none; cursor: pointer;
	border: 1px solid transparent; white-space: nowrap;
	transition: background .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
}
.bl-wlc-btn--primary,
.woocommerce a.bl-wlc-btn--primary.button { background: var(--pink); color: #fff; border-color: var(--pink); }
.bl-wlc-btn--primary:hover,
.woocommerce a.bl-wlc-btn--primary.button:hover { background: var(--pink-2); border-color: var(--pink-2); color: #fff; }
.bl-wlc-btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.bl-wlc-btn--ghost:hover { border-color: var(--pink); color: var(--pink); }
.bl-wlc-btn.is-disabled { opacity: .5; cursor: default; pointer-events: none; }
.bl-wlc-btn.added::after { content: "\2713"; margin-left: 4px; }
a.added_to_cart.wc-forward { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--pink); }

.bl-wlc-remove {
	display: inline-flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; border-radius: 50%; padding: 0;
	background: var(--chip-bg); color: var(--muted); border: 1px solid var(--line); cursor: pointer;
	transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.bl-wlc-remove:hover { color: #ff4d6d; border-color: #ff4d6d; background: rgba(255, 77, 109, .1); }

/* ---------- Page layout ---------- */
.bl-wlc { margin: 10px 0 40px; color: var(--ink); }
.bl-wlc__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.bl-wlc__title { display: flex; align-items: center; gap: 10px; margin: 0; font: 800 22px/1.2 var(--display); color: var(--ink); }
.bl-wlc__count { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--pink); color: #fff; font: 700 13px/26px var(--font); text-align: center; }
.bl-wlc__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.bl-wlc-stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.bl-wlc-stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.bl-wlc-stock.is-in { color: #22c55e; }
.bl-wlc-stock.is-out { color: #ff4d6d; }

/* Empty state */
.bl-wlc-empty { max-width: 460px; margin: 30px auto 50px; padding: 40px 24px; text-align: center; border: 1px dashed var(--line); border-radius: 18px; background: var(--chip-bg); }
.bl-wlc-empty__ico { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--pink); background: rgba(255, 45, 155, .12); }
.bl-wlc-empty__ico svg { width: 30px; height: 30px; }
.bl-wlc-empty h2 { margin: 0 0 8px; font: 800 20px/1.3 var(--display); color: var(--ink); }
.bl-wlc-empty p { margin: 0 0 20px; color: var(--muted); font-size: 14px; }

/* ---------- Wishlist list ---------- */
.bl-wishlist__list { display: flex; flex-direction: column; gap: 12px; }
.bl-wishlist__item {
	display: grid; grid-template-columns: 92px minmax(0, 1fr) auto auto; align-items: center; gap: 18px;
	padding: 14px 16px; border-radius: 16px;
	background: var(--chip-bg); border: 1px solid var(--line);
	transition: border-color .2s ease, opacity .25s ease, transform .25s ease;
}
.bl-wishlist__item:hover { border-color: rgba(255, 45, 155, .35); }
.bl-wishlist__item.is-removing { opacity: 0; transform: translateX(20px); }
.bl-wishlist__img { display: block; width: 92px; height: 92px; border-radius: 12px; overflow: hidden; background: #fff; }
.bl-wishlist__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bl-wishlist__info { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.bl-wishlist__brand { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bl-wishlist__name { font-weight: 700; font-size: 15px; line-height: 1.35; color: var(--ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bl-wishlist__name:hover { color: var(--pink); }
.bl-wishlist__price { font-weight: 800; font-size: 16px; color: var(--ink); white-space: nowrap; text-align: right; }
.bl-wishlist__price del { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.bl-wishlist__price ins { text-decoration: none; }
.bl-wishlist__actions { display: flex; align-items: center; gap: 10px; }

@media (max-width: 720px) {
	.bl-wishlist__item { grid-template-columns: 76px minmax(0, 1fr); gap: 12px 14px; }
	.bl-wishlist__img { width: 76px; height: 76px; grid-row: span 2; }
	.bl-wishlist__price { text-align: left; }
	.bl-wishlist__actions { grid-column: 1 / -1; justify-content: space-between; }
	.bl-wishlist__actions .bl-wlc-btn { flex: 1; }
}

/* ---------- Compare table ---------- */
.bl-compare__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 16px; border: 1px solid var(--line); background: var(--chip-bg); }
.bl-compare__table { width: 100%; min-width: calc(150px + var(--bl-cols, 2) * 210px); border-collapse: separate; border-spacing: 0; table-layout: fixed; margin: 0; }
.bl-compare__table th,
.bl-compare__table td { padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; font-size: 14px; color: var(--ink); background: transparent; }
.bl-compare__table tr:last-child th,
.bl-compare__table tr:last-child td { border-bottom: 0; }
.bl-compare__table td + td { border-left: 1px solid var(--line); }
.bl-compare__label {
	width: 150px; position: sticky; left: 0; z-index: 2;
	font-size: 12px !important; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
	color: var(--muted) !important; background: var(--header-bg) !important;
}
.bl-compare__table thead td { vertical-align: bottom; }
.bl-compare__product { position: relative; display: flex; flex-direction: column; gap: 10px; }
.bl-compare__product .bl-wlc-remove { position: absolute; top: -4px; right: -4px; width: 30px; height: 30px; z-index: 1; }
.bl-compare__img { display: block; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: #fff; }
.bl-compare__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bl-compare__name { font-weight: 700; font-size: 14px; line-height: 1.35; color: var(--ink); text-decoration: none; min-height: 38px; }
.bl-compare__name:hover { color: var(--pink); }
.bl-compare__product .bl-wlc-btn { width: 100%; }
.bl-compare__row--price td { font-weight: 800; font-size: 16px; }
.bl-compare__row--price del { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.bl-compare__row--price ins { text-decoration: none; }
.bl-compare__row--summary td { font-size: 13px; line-height: 1.6; color: var(--muted-2); }
.bl-compare__na { color: var(--muted); }
.bl-compare__table tbody tr:hover td { background: rgba(255, 45, 155, .04); }
.bl-compare__table.only-diff tr[data-same="1"] { display: none; }
.bl-compare__hint { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.bl-compare__hint a { color: var(--pink); font-weight: 700; }

.bl-wlc-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; user-select: none; }
.bl-wlc-switch input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; margin: 0; border-radius: 11px; background: var(--line); border: 1px solid var(--line); position: relative; cursor: pointer; transition: background .2s ease; }
.bl-wlc-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.bl-wlc-switch input:checked { background: var(--pink); border-color: var(--pink); }
.bl-wlc-switch input:checked::after { transform: translateX(16px); }

@media (max-width: 720px) {
	.bl-compare__label { width: 110px; }
	.bl-compare__table { min-width: calc(110px + var(--bl-cols, 2) * 170px); }
	.bl-compare__table th, .bl-compare__table td { padding: 12px; font-size: 13px; }
}

/* ---------- Floating compare bar ---------- */
.bl-cmpbar {
	position: fixed; left: 50%; bottom: 16px; z-index: 9990;
	width: min(760px, calc(100% - 24px));
	transform: translate(-50%, 140%); transition: transform .35s cubic-bezier(.2, .8, .2, 1);
	border-radius: 18px; background: rgba(13, 10, 28, .96); border: 1px solid rgba(168, 85, 247, .35);
	box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
	color: #fff;
}
[data-theme="light"] .bl-cmpbar { background: rgba(255, 255, 255, .97); color: var(--ink); border-color: rgba(124, 58, 237, .25); box-shadow: 0 18px 40px rgba(20, 10, 40, .18); }
.bl-cmpbar.is-open { transform: translate(-50%, 0); }
.bl-cmpbar__inner { display: flex; align-items: center; gap: 16px; padding: 12px 14px; }
.bl-cmpbar__title { font: 800 14px/1.2 var(--display); white-space: nowrap; }
.bl-cmpbar__title span { display: block; margin-top: 3px; font: 600 12px var(--font); color: var(--muted); }
.bl-cmpbar__items { display: flex; gap: 8px; flex: 1; min-width: 0; }
.bl-cmpbar__item { position: relative; width: 52px; height: 52px; flex: 0 0 52px; border-radius: 10px; background: #fff; }
.bl-cmpbar__item a, .bl-cmpbar__item img { display: block; width: 100%; height: 100%; border-radius: 10px; object-fit: contain; }
.bl-cmpbar__item.is-empty { background: transparent; border: 1px dashed rgba(168, 85, 247, .45); }
.bl-cmpbar__x { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 0; background: var(--pink); color: #fff; font: 700 14px/20px var(--font); cursor: pointer; }
.bl-cmpbar__actions { display: flex; gap: 8px; }
.bl-cmpbar .bl-wlc-btn--ghost { color: inherit; border-color: rgba(255, 255, 255, .18); }
[data-theme="light"] .bl-cmpbar .bl-wlc-btn--ghost { border-color: var(--line); }
body.bl-has-cmpbar { padding-bottom: 96px; }

@media (max-width: 600px) {
	.bl-cmpbar { bottom: 10px; }
	.bl-cmpbar__inner { flex-wrap: wrap; gap: 10px; }
	.bl-cmpbar__title { flex: 1; }
	.bl-cmpbar__items { order: 3; flex-basis: 100%; }
	.bl-cmpbar__item { width: 44px; height: 44px; flex-basis: 44px; }
	.bl-cmpbar__actions .bl-wlc-btn { min-height: 36px; padding: 7px 12px; }
	body.bl-has-cmpbar { padding-bottom: 150px; }
}

/* ---------- Toast ---------- */
.bl-wlc-toast {
	position: fixed; left: 50%; top: 18px; z-index: 9999;
	display: flex; align-items: center; gap: 14px;
	max-width: calc(100% - 24px); padding: 12px 18px; border-radius: 12px;
	background: #171228; color: #fff; border: 1px solid rgba(255, 45, 155, .45);
	box-shadow: 0 12px 34px rgba(0, 0, 0, .4);
	font: 600 14px/1.35 var(--font);
	opacity: 0; transform: translate(-50%, -16px); pointer-events: none;
	transition: opacity .25s ease, transform .25s ease;
}
.bl-wlc-toast.is-open { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.bl-wlc-toast.is-error { border-color: #ff4d6d; }
.bl-wlc-toast a { color: var(--pink-soft); font-weight: 800; white-space: nowrap; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
	.bl-cmpbar, .bl-wlc-toast, .bl-wishlist__item, .bl-card__wish svg { transition: none; animation: none; }
}

/* =====================================================================
 * Card icon placement fix (home carousels: Today's Best / New Arrivals /
 * Most Popular, and the mobile navy cards). Scoped + !important because
 * several older rules (theme.css + custom CSS in the admin) fight over
 * these buttons: they were oversized, dark, touching each other and
 * sitting on top of the product image.
 * ===================================================================== */
.bl-card > .bl-card__wish,
.bl-card > .bl-card__compare,
.bl-dcard > .bl-card__compare,
.bl-dcard__wish > .bl-card__wish {
	position: absolute !important;
	right: 12px !important;
	left: auto !important;
	width: 34px !important;
	height: 34px !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	border-radius: 50% !important;
	border: 1px solid rgba(28, 21, 48, .08) !important;
	background: #fff !important;
	color: #6b6580 !important;
	box-shadow: 0 3px 10px rgba(28, 21, 48, .12) !important;
	z-index: 3 !important;
	opacity: 1;
	transform: none;
	transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease, opacity .2s ease !important;
}
.bl-card > .bl-card__wish { top: 12px !important; }
.bl-card > .bl-card__compare { top: 54px !important; }

.bl-dcard__wish { top: 10px !important; right: 10px !important; }
.bl-dcard__wish > .bl-card__wish { position: static !important; }
.bl-dcard > .bl-card__compare { top: 52px !important; right: 10px !important; }

.bl-card > .bl-card__wish svg,
.bl-card > .bl-card__compare svg,
.bl-dcard > .bl-card__compare svg,
.bl-dcard__wish > .bl-card__wish svg { width: 16px !important; height: 16px !important; }

/* Hover */
.bl-card > .bl-card__wish:hover,
.bl-dcard__wish > .bl-card__wish:hover { color: var(--pink) !important; border-color: rgba(255, 45, 155, .35) !important; transform: scale(1.08) !important; }
.bl-card > .bl-card__compare:hover,
.bl-dcard > .bl-card__compare:hover { color: var(--purple) !important; border-color: rgba(124, 58, 237, .35) !important; transform: scale(1.08) !important; }

/* Active (in wishlist / in compare) */
.bl-card > .bl-card__wish.is-active,
.bl-dcard__wish > .bl-card__wish.is-active { background: var(--pink) !important; border-color: var(--pink) !important; color: #fff !important; box-shadow: 0 4px 14px rgba(255, 45, 155, .45) !important; }
.bl-card > .bl-card__wish.is-active svg,
.bl-dcard__wish > .bl-card__wish.is-active svg { fill: currentColor !important; }
.bl-card > .bl-card__compare.is-active,
.bl-dcard > .bl-card__compare.is-active { background: var(--purple) !important; border-color: var(--purple) !important; color: #fff !important; box-shadow: 0 4px 14px rgba(124, 58, 237, .45) !important; }

/* Desktop: keep the icons subtle until the card is hovered (always visible when active / on touch). */
@media (hover: hover) and (min-width: 992px) {
	.bl-card > .bl-card__wish,
	.bl-card > .bl-card__compare { opacity: 0; transform: translateX(6px) !important; }
	.bl-card:hover > .bl-card__wish,
	.bl-card:hover > .bl-card__compare,
	.bl-card > .bl-card__wish:focus-visible,
	.bl-card > .bl-card__compare:focus-visible,
	.bl-card > .bl-card__wish.is-active,
	.bl-card > .bl-card__compare.is-active { opacity: 1; transform: none !important; }
	.bl-card > .bl-card__compare { transition-delay: .04s !important; }
}