/* Wishlist Sidebar - Стилі для бокового списку бажань
========================================= */

/* Загальні стилі та позиціонування лайтбокса
------------------------------------------ */
.wishlist-lightbox .lightbox-background {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9998;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.wishlist-lightbox.active .lightbox-background {
	opacity: 1;
	visibility: visible;
}

.wishlist-lightbox .lightbox-section {
	position: fixed;
	top: 0;
	right: -120vw;
	width: 760px;
	height: 100dvh !important;
	max-height: 100dvh !important;
	margin-top: 0 !important;
	padding: 30px;
	background: #fff;
	z-index: 9999;
	transition: right 0.3s ease;
	overflow-y: auto;
	border-radius: 0px;
}

.wishlist-lightbox.active .lightbox-section {
	right: 0;
}

.wishlist-lightbox .lightbox-content {
	display: flex;
	flex-direction: column;
	height: 100%;
	max-height: 100%;
}

/* Кнопка закриття
---------------- */
.wishlist-lightbox .close-lightbox {
	position: absolute;
	top: 20px;
	right: 20px;
	padding: 0px;
	width: 35px;
	height: 35px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	z-index: 1;
}

.wishlist-lightbox .close-lightbox img {
	width: 24px;
	height: 24px;
}

/* Хедер списку бажань
-------------------- */
.wishlist-lightbox .wishlist-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 30px;
	padding-right: 45px; /* Відступ для кнопки закриття */
}

.wishlist-lightbox .form-head {
	display: flex;
	align-items: center;
	gap: 15px;
}

.wishlist-lightbox .form-head img {
	width: 32px;
	height: 32px;
	object-fit: contain;
}

.wishlist-lightbox .form-head .h2 {
	margin: 0;
	font-size: 24px;
	line-height: 28px;
}

/* Тіло списку бажань та список товарів
------------------------------------- */
.wishlist-lightbox .wishlist-body {
	overflow-y: auto;
}

.wishlist-lightbox .wishlist-items {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Елемент товару в списку бажань
------------------------------- */
.wishlist-lightbox .wishlist-item {    
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 15px;
	transition: all 0.3s ease;
}

/* Зображення товару */
.wishlist-lightbox .product-image {
	flex: 0 0 80px;
	border: 1px solid #f3f3f3;
	border-radius: 8px;
}

.wishlist-lightbox .product-image img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 8px;
}

/* Інформація про товар */
.wishlist-lightbox .product-info {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: calc(100% - 350px);
}

.wishlist-lightbox .product-name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	font-weight: 500;
	font-size: 16px;
	line-height: 20px;
	color: var(--black);
}

.wishlist-lightbox .product-name a {
	color: inherit;
	text-decoration: none;
	transition: color 0.3s ease;
}

.wishlist-lightbox .product-name a:hover {
	color: var(--primary);
}

.wishlist-lightbox .product-variations {
	font-size: 13px;
	color: #666;
	line-height: 18px;
}

.wishlist-lightbox .variation-item {
	margin-bottom: 2px;
}

.wishlist-lightbox .product-price {
	font-weight: 600;
	font-size: 16px;
	margin-top: 5px;
}

/* Управління кількістю товару
---------------------------- */
.wishlist-lightbox .product-quantity {
	position: relative;
	margin: 0 10px;
}

.wishlist-lightbox .product-quantity .custom-quantity-input {
	display: flex;
	align-items: center;
	border: 1px solid #234B5A;
	border-radius: 60px;
	background: #fff;
	overflow: hidden;
}

.wishlist-lightbox .quantity-btn {
	width: 30px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: none;
	cursor: pointer;
	font-size: 18px;
	font-weight: 600;
	color: #666;
	transition: all 0.3s ease;
}

.wishlist-lightbox .quantity-display {
	width: 20px;
	height: 40px;
	border: none;
	padding: 0;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
}

/* Дії з товаром
-------------- */
.wishlist-lightbox .product-actions {
	position: relative;
	margin: 0 auto;
	min-width: max-content;
}

.wishlist-lightbox .add-to-cart-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 40px;
	min-width: 100px;
	padding: 0 20px;
	background: var(--primary);
	border: none;
	border-radius: 100px;
	font-size: 14px;
	font-weight: 600;
	color: var(--primary-match);
	text-decoration: none;
	transition: all 0.3s ease;
	cursor: pointer;
}

.wishlist-lightbox .add-to-cart-btn:hover {
	background: var(--accent);
}

.wishlist-lightbox .add-to-cart-btn span {
	font-family: var(--font-family-2);
	font-weight: 500;
	text-transform: uppercase;
	color: var(--primary-match);
}

/* Кнопка видалення товару */
.wishlist-lightbox .product-remove {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 30px;
	height: 30px;
	margin-top: 5px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.wishlist-lightbox .product-remove img {
	width: 26px;
	height: 26px;
	object-fit: contain;
	transition: all 0.3s ease;
}

.wishlist-lightbox .product-remove span {
	display: none;
}

/* Порожній список бажань
----------------------- */
.wishlist-lightbox .wishlist-empty-message {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 60px 20px;
	gap: 20px;
	margin-top: auto;
	height: 80dvh;
}

.wishlist-lightbox .wishlist-empty-message p {
	font-size: 16px;
	color: #999;
	margin: 0;
}

/* Стани завантаження та оновлення
-------------------------------- */
.wishlist-lightbox .wishlist-loading {
	display: none;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.9);
	z-index: 10;
	justify-content: center;
	align-items: center;
}

.wishlist-lightbox.loading .wishlist-loading {
	display: flex;
}

.wishlist-lightbox .loader-spinner {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 4px solid #f3f3f3;
	border-top: 4px solid var(--primary);
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.wishlist-lightbox.loading .wishlist-body {
	opacity: 0.6;
	pointer-events: none;
}

.wishlist-lightbox .wishlist-item.updating {
	position: relative;
	opacity: 0.7;
	pointer-events: none;
}

.wishlist-lightbox .wishlist-item.updating:after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.5);
	border-radius: 10px;
	z-index: 1;
}

/* Адаптивні стилі
---------------- */
@media (max-width: 768px) {
	.wishlist-lightbox .lightbox-section {
		width: 100%;
		max-width: 100%;
		right: -100%;
		padding: 10px;
	}

	.wishlist-lightbox .close-lightbox {
		top: 20px;
		right: 20px;
		width: 32px;
		height: 32px;
	}

	.wishlist-lightbox .lightbox-content {
		padding-right: 0px;
	}

	.wishlist-lightbox .wishlist-header {
		margin-bottom: 20px;
		padding-right: 40px;
	}

	.wishlist-lightbox .form-head .h2 {
		font-size: 20px;
		line-height: 24px;
	}

	.wishlist-lightbox .wishlist-items {
		gap: 15px;
	}

	.wishlist-lightbox .wishlist-item {
		padding: 12px;
	}

	.wishlist-lightbox .product-image {
		flex: 0 0 60px;
	}

	.wishlist-lightbox .product-image img {
		width: 60px;
		height: 60px;
	}

	.wishlist-lightbox .product-name {
		font-size: 14px;
		line-height: 18px;
	}

	.wishlist-lightbox .product-price {
		font-size: 15px;
	}

	.wishlist-lightbox .product-actions {
		margin-top: 12px;
	}

	.wishlist-lightbox .add-to-cart-btn {
		height: 35px;
		font-size: 12px;
		min-width: 90px;
		padding: 0 15px;
	}
	.wishlist-lightbox .product-quantity {
		display: none;
	}
	.wishlist-lightbox .product-info {
		gap: 4px;
		width: calc(100% - 0px);
	}
	.wishlist-lightbox .product-remove {
		width: 20px;
		height: 20px;
		margin-top: 18px;
	}
	.wishlist-lightbox .product-remove img {
		width: 20px;
		height: 20px;
		min-width: 20px;
	}
}