/**
 * 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; }
}
