/* Elementor wishlist widget */
.nextshop-wishlist-widget {
	display: inline-flex;
	align-items: center;
	position: relative;
}

.nextshop-wishlist-widget--placeholder {
	padding: 12px 16px;
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	color: #64748b;
	font-size: 0.875rem;
}

.nextshop-wishlist-widget__trigger {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 0;
	background: transparent;
	padding: 8px 12px;
	cursor: pointer;
	color: inherit;
	font: inherit;
	line-height: 1;
	transition: color 0.2s ease;
}

.nextshop-wishlist-widget__trigger:hover,
.nextshop-wishlist-widget__trigger.has-items {
	color: #ef394e;
}

.nextshop-wishlist-widget__icon {
	display: inline-flex;
	font-size: 1.25rem;
}

.nextshop-wishlist-widget__label {
	font-size: 0.875rem;
	font-weight: 600;
}

.nextshop-wishlist-widget .nextshop-wishlist-count {
	position: absolute;
	top: 0;
	right: 0;
	left: auto;
	transform: translate(25%, -25%);
}

/* Modal — portaled to body for top stacking layer */
.nextshop-wishlist-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	pointer-events: none;
}

.nextshop-wishlist-modal--portaled,
.nextshop-wishlist-modal.is-open {
	pointer-events: auto;
}

.nextshop-wishlist-modal[hidden]:not(.is-open) {
	display: none !important;
}

.nextshop-wishlist-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.62);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.nextshop-wishlist-modal__panel {
	position: relative;
	z-index: 1;
	width: min(1080px, 100%);
	max-height: min(90vh, 920px);
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
	overflow: hidden;
	animation: nextshop-wishlist-modal-in 0.28s ease;
}

@keyframes nextshop-wishlist-modal-in {
	from {
		opacity: 0;
		transform: translateY(16px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.nextshop-wishlist-modal__header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 20px 24px;
	border-bottom: 1px solid #e2e8f0;
	background: linear-gradient(180deg, #fff 0%, #fafbfd 100%);
}

.nextshop-wishlist-modal__title {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 800;
	flex: 1;
	color: #1e293b;
}

.nextshop-wishlist-modal__count {
	margin: 0;
	padding: 4px 10px;
	background: #fff5f6;
	color: #ef394e;
	font-size: 0.8125rem;
	font-weight: 700;
	border-radius: 999px;
	white-space: nowrap;
}

.nextshop-wishlist-modal__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 999px;
	background: #f1f5f9;
	color: #334155;
	cursor: pointer;
	font-size: 1rem;
	transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.nextshop-wishlist-modal__close:hover {
	background: #fee2e2;
	color: #ef394e;
	transform: scale(1.05);
}

.nextshop-wishlist-modal__body {
	flex: 1;
	overflow: auto;
	padding: 22px 24px 26px;
	background: #f8fafc;
}

.nextshop-wishlist-modal__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 48px 20px;
	color: #64748b;
	font-weight: 600;
}

.nextshop-wishlist-modal__loading[hidden] {
	display: none !important;
}

.nextshop-wishlist-modal__spinner {
	width: 24px;
	height: 24px;
	border: 2px solid #e2e8f0;
	border-top-color: #ef394e;
	border-radius: 50%;
	animation: nextshop-wishlist-spin 0.8s linear infinite;
}

@keyframes nextshop-wishlist-spin {
	to {
		transform: rotate(360deg);
	}
}

.nextshop-wishlist-modal__footer {
	padding: 16px 24px;
	border-top: 1px solid #e2e8f0;
	text-align: center;
	background: #fff;
}

.nextshop-wishlist-modal__error {
	margin: 0;
	padding: 24px;
	text-align: center;
	color: #b91c1c;
}

.nextshop-wishlist-modal__content .nextshop-wishlist-empty {
	background: #fff;
	border-color: #e2e8f0;
}

/* Modal product grid — column counts set per widget via inline <style> */
.nextshop-wishlist-modal-grid {
	display: grid;
	gap: 16px;
}

.nextshop-wishlist-modal-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}

.nextshop-wishlist-modal-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
	border-color: rgba(239, 57, 78, 0.22);
}

.nextshop-wishlist-modal-card.is-out-of-stock {
	opacity: 0.88;
}

.nextshop-wishlist-modal-card__link {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 12px 12px 14px;
	text-decoration: none;
	color: inherit;
}

.nextshop-wishlist-modal-card__media {
	position: relative;
	margin-bottom: 10px;
}

.nextshop-wishlist-modal-card__thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	background: #f8fafc;
	border-radius: 12px;
	overflow: hidden;
	padding: 10px;
}

.nextshop-wishlist-modal-card__thumb img,
.nextshop-wishlist-modal-card__img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	transition: transform 0.35s ease;
}

.nextshop-wishlist-modal-card:hover .nextshop-wishlist-modal-card__thumb img,
.nextshop-wishlist-modal-card:hover .nextshop-wishlist-modal-card__img {
	transform: scale(1.05);
}

.nextshop-wishlist-modal-card__badge {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 2;
	padding: 3px 8px;
	border-radius: 6px;
	font-size: 0.68rem;
	font-weight: 800;
	line-height: 1.3;
	white-space: nowrap;
}

.nextshop-wishlist-modal-card__badge--sale {
	background: #ef394e;
	color: #fff;
}

.nextshop-wishlist-modal-card__badge--oos {
	background: #64748b;
	color: #fff;
	left: auto;
	right: 8px;
}

.nextshop-wishlist-modal-card__title {
	margin: 0 0 8px;
	padding: 0 4px;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.45;
	text-align: center;
	color: #1e293b;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.5em;
}

.nextshop-wishlist-modal-card__price {
	text-align: center;
	font-size: 0.875rem;
	font-weight: 800;
	color: #ef394e;
	line-height: 1.35;
	padding: 0 4px;
}

.nextshop-wishlist-modal-card__price del {
	color: #94a3b8;
	font-weight: 500;
	font-size: 0.78rem;
}

.nextshop-wishlist-modal-card__price ins {
	text-decoration: none;
}

.nextshop-wishlist-modal-remove {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.96);
	color: #ef394e;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
	cursor: pointer;
	font-size: 0.78rem;
	transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.nextshop-wishlist-modal-remove:hover {
	background: #fff5f6;
	transform: scale(1.08);
	box-shadow: 0 6px 18px rgba(239, 57, 78, 0.22);
}

body.nextshop-wishlist-modal-open {
	overflow: hidden;
}

@media (max-width: 768px) {
	.nextshop-wishlist-modal {
		padding: 0;
		align-items: flex-end;
	}

	.nextshop-wishlist-modal__panel {
		width: 100%;
		max-height: 94vh;
		border-radius: 20px 20px 0 0;
		animation-name: nextshop-wishlist-modal-in-mobile;
	}

	@keyframes nextshop-wishlist-modal-in-mobile {
		from {
			opacity: 0;
			transform: translateY(100%);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}

	.nextshop-wishlist-modal__header {
		padding: 16px 18px;
	}

	.nextshop-wishlist-modal__body {
		padding: 16px 16px 20px;
	}

	.nextshop-wishlist-modal-grid {
		gap: 12px;
	}

	.nextshop-wishlist-modal-card__title {
		font-size: 0.8125rem;
		min-height: 2.35em;
	}
}
