/* 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: #272727;
	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: 30px;
	right: 30px;
	padding: 0px;
	background: transparent;
	border-radius: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	z-index: 1;
}

.wishlist-lightbox .close-lightbox:hover {
	opacity: 0.7;
}

.wishlist-lightbox .close-lightbox img {
	width: 16px;
	height: 16px;
	filter: brightness(0) invert(1);
}

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

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

.wishlist-lightbox .form-head img {
	display: none;
}

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

/* Тіло списку бажань та список товарів
------------------------------------- */

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

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

.wishlist-lightbox .wishlist-item:hover {
	background: transparent;
}

/* Зображення товару */
.wishlist-lightbox .product-image {
	flex: 0 0 50px;
	filter: none;
}

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

/* Інформація про товар */
.wishlist-lightbox .product-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wishlist-lightbox .product-name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	font-weight: 400;
	font-size: 14px;
	line-height: 18px;
}

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

.wishlist-lightbox .product-name a:hover {
	color: #cccccc;
}

.wishlist-lightbox .product-price {
	font-weight: 500;
	font-size: 15px;
	color: #ffffff;
	margin-top: 2px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.wishlist-lightbox .product-price del {
	font-size: 13px;
	color: #666;
	font-weight: 400;
}

/* Дії з товаром
------------- */
.wishlist-lightbox .product-actions {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-top: 0;
	margin-left: auto;
}

/* Управління кількістю товару */
.wishlist-lightbox .product-quantity {
	display: flex;
	align-items: center;
}

.wishlist-lightbox .product-quantity .custom-quantity-input {
	display: flex;
	align-items: center;
	border: 1px solid #4A4A4A;
	border-radius: 5px;
	background: transparent;
	overflow: hidden;
}

.wishlist-lightbox .quantity-btn {
	width: 28px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	cursor: pointer;
	font-size: 16px;
	color: #ffffff;
	transition: all 0.3s ease;
}

.wishlist-lightbox .quantity-btn:hover {
	background: rgba(255, 255, 255, 0.1);
}

.wishlist-lightbox .quantity-display {
	width: 32px;
	height: 44px;
	border: none;
	padding: 0;
	text-align: center;
	font-size: 14px;
	font-weight: 400;
	background: transparent;
	color: #ffffff;
}

/* Кнопка додавання в кошик */
.wishlist-lightbox .add-to-cart-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 44px;
	padding: 0 15px;
	background: #5F5F6A;
	border: none;
	border-radius: 5px;
	font-size: 13px;
	color: #ffffff;
	text-decoration: none;
	transition: all 0.3s ease;
	cursor: pointer;
}

.wishlist-lightbox .add-to-cart-btn:hover {
	background: #4B4B59;
}

.wishlist-lightbox .add-to-cart-btn img {
	width: 16px;
	height: 16px;
	filter: brightness(0) invert(1);
}

.wishlist-lightbox .add-to-cart-btn span {
	color: #ffffff;
	font-weight: 400;
}

/* Кнопка видалення товару */
.wishlist-lightbox .product-remove {
	position: relative;
	top: auto;
	right: auto;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 44px;
	height: 44px;
	background: #c74b4b;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.wishlist-lightbox .product-remove:hover {
	background: red;
}

.wishlist-lightbox .product-remove img {
	width: 18px;
	height: 18px;
	filter: brightness(0) invert(1);
	transition: all 0.3s ease;
}

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

/* Порожній список бажань
----------------------- */
.wishlist-lightbox .wishlist-empty-message {
	text-align: center;
	padding: 60px 20px;
}

.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(39, 39, 39, 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 #4A4A4A;
	border-top: 4px solid #ffffff;
	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(39, 39, 39, 0.5);
	border-radius: 0;
	z-index: 1;
}

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

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

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

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

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

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

	.wishlist-lightbox .wishlist-item {
		padding: 0;
	}

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

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

	.wishlist-lightbox .product-name {
		font-size: 13px;
		line-height: 17px;
	}

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

	.wishlist-lightbox .product-actions {
		gap: 10px;
	}
	.wishlist-lightbox .add-to-cart-btn {
		height: 40px;
	}
	.wishlist-lightbox .product-remove {
		width: 40px;
		height: 40px;
	}
}