/**
 * Ventureheap Builder - wishlist and quick view.
 */

/* Toast ------------------------------------------------------------------- */
.vhb-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 100000;
	max-width: calc(100% - 32px);
	padding: .75rem 1.1rem;
	font-size: .92rem;
	font-weight: 600;
	color: #fff;
	background: var(--vhb-secondary, #0f172a);
	border-radius: 999px;
	box-shadow: 0 12px 30px -12px rgba(15, 23, 42, .5);
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 12px);
	transition: opacity .2s ease, transform .2s ease;
}

.vhb-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Quick view -------------------------------------------------------------- */
body.vhb-qv-open { overflow: hidden; }

.vhb-qv-modal { position: fixed; inset: 0; z-index: 99990; display: flex; align-items: center; justify-content: center; padding: 24px; }
.vhb-qv-modal[hidden] { display: none; }
.vhb-qv-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .6); }

.vhb-qv-modal__dialog {
	position: relative;
	width: min(960px, 100%);
	max-height: calc(100vh - 48px);
	overflow: auto;
	background: var(--vhb-bg, #fff);
	border-radius: calc(var(--vhb-radius, 12px) + 4px);
	box-shadow: 0 30px 80px -30px rgba(15, 23, 42, .6);
	outline: none;
}

.vhb-qv-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 40px;
	height: 40px;
	font-size: 26px;
	line-height: 1;
	color: var(--vhb-secondary);
	background: rgba(255, 255, 255, .92);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.vhb-qv-modal__close:hover { background: var(--vhb-alt); }
.vhb-qv-modal__loading,
.vhb-qv-modal__error { margin: 0; padding: 72px 24px; text-align: center; color: var(--vhb-muted); }

.vhb-qv { display: grid; grid-template-columns: 1fr; }
.vhb-qv__media { position: relative; background: var(--vhb-alt); }
.vhb-qv__media img { display: block; width: 100%; height: 100%; max-height: 520px; object-fit: cover; }
.vhb-qv__body { display: flex; flex-direction: column; gap: .7rem; padding: 32px; }
.vhb-qv__cat { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--vhb-primary); }
.vhb-qv__title { margin: 0; font-size: 1.6rem; line-height: 1.2; color: var(--vhb-secondary); outline: none; }
.vhb-qv__price { font-size: 1.4rem; font-weight: 700; color: var(--vhb-secondary); }
.vhb-qv__price del { font-size: .7em; font-weight: 400; color: var(--vhb-muted); margin-right: .35rem; }
.vhb-qv__price ins { text-decoration: none; color: var(--vhb-primary); }
.vhb-qv__text { color: var(--vhb-muted); }
.vhb-qv__text p:last-child { margin-bottom: 0; }

.vhb-qv__actions { display: flex; align-items: center; gap: 10px; margin-top: .4rem; }

.vhb-qv__actions .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 1;
	padding: .85rem 1.4rem;
	font-weight: 600;
	color: #fff;
	text-decoration: none;
	background: var(--vhb-primary);
	border: 0;
	border-radius: var(--vhb-radius-btn);
}

.vhb-qv__actions .button:hover { filter: brightness(.92); color: #fff; }
.vhb-qv__actions .added_to_cart { font-weight: 600; white-space: nowrap; }
.vhb-qv__wish { flex: 0 0 auto; width: 46px; height: 46px; border: 1px solid var(--vhb-border); box-shadow: none; }
.vhb-qv__more { align-self: flex-start; font-weight: 600; color: var(--vhb-secondary); }
.vhb-qv__more::after { content: " \2192"; }

@media (min-width: 768px) {
	.vhb-qv { grid-template-columns: 1fr 1fr; }
	.vhb-qv__media img { max-height: none; min-height: 100%; }
}

@media (max-width: 600px) {
	.vhb-qv-modal { padding: 0; align-items: flex-end; }
	.vhb-qv-modal__dialog { max-height: 92vh; border-radius: 18px 18px 0 0; }
	.vhb-qv__body { padding: 22px 18px 26px; }
	.vhb-qv__title { font-size: 1.3rem; }
}

/* Wishlist page ----------------------------------------------------------- */
.vhb-wishlist-page { min-height: 120px; }
.vhb-wishlist-page.is-loading { position: relative; }

.vhb-wishlist-page.is-loading::after {
	content: "";
	position: absolute;
	top: 40px;
	left: 50%;
	width: 32px;
	height: 32px;
	margin-left: -16px;
	border: 3px solid var(--vhb-border);
	border-top-color: var(--vhb-primary);
	border-radius: 50%;
	animation: vhb-spin .8s linear infinite;
}

@keyframes vhb-spin { to { transform: rotate(360deg); } }

.vhb-wishlist-empty {
	max-width: 520px;
	margin: 0 auto;
	padding: 48px 24px;
	text-align: center;
	background: var(--vhb-alt);
	border-radius: var(--vhb-radius);
}

.vhb-wishlist-empty[hidden] { display: none; }
.vhb-wishlist-empty__icon { display: block; font-size: 44px; line-height: 1; color: var(--vhb-primary); }
.vhb-wishlist-empty__title { margin: 12px 0 6px; font-size: 1.35rem; color: var(--vhb-secondary); }
.vhb-wishlist-empty__text { margin: 0 0 20px; color: var(--vhb-muted); }

@media (prefers-reduced-motion: reduce) {
	.vhb-toast,
	.vhb-wishlist-page.is-loading::after { transition: none; animation: none; }
}

/* Product signals --------------------------------------------------------- */
.vhb-signals { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; }

.vhb-signal {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: .95rem;
	font-weight: 600;
	color: var(--vhb-secondary);
}

.vhb-signal::before {
	content: "";
	width: 18px;
	height: 18px;
	background: currentColor;
	mask: var(--vhb-signal-icon) center / contain no-repeat;
}

.vhb-signal--low {
	color: #b45309;
	--vhb-signal-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round'%3E%3Cpath d='M12 8v5m0 3.5v.5'/%3E%3Cpath d='M10.3 3.9 2.6 17a2 2 0 0 0 1.7 3h15.4a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.vhb-signal--out {
	color: var(--vhb-muted);
	--vhb-signal-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E");
}

.vhb-signal--sold {
	color: #15803d;
	--vhb-signal-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 17l5-5 4 3 7-8'/%3E%3Cpath d='M15 7h5v5'/%3E%3C/svg%3E");
}

.vhb-signal--new {
	color: var(--vhb-primary);
	--vhb-signal-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linejoin='round'%3E%3Cpath d='M12 3l2.6 5.6 6.1.8-4.5 4.2 1.2 6.1L12 16.8 6.6 19.7l1.2-6.1L3.3 9.4l6.1-.8z'/%3E%3C/svg%3E");
}

/* Product action row ------------------------------------------------------ */
.vhb-product-actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; }

.vhb-product-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0;
	font: inherit;
	font-size: .92rem;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: var(--vhb-secondary);
	text-decoration: none;
	background: none;
	border: 0;
	cursor: pointer;
}

.vhb-product-link:hover { color: var(--vhb-primary); }
.vhb-product-link.is-active { color: #e11d48; }
.vhb-product-link.is-active .vhb-icon-heart path { fill: currentColor; }
