/**
 * La-Kass Quick View, Compare, Wishlist Styles
 *
 * @package La-Kass
 * @since   1.0.0
 */

/* ══════════════════════════════════════════════
   Modal Open — shared state
   ══════════════════════════════════════════════ */
.lk-modal-open {
	overflow: hidden;
}

/* ══════════════════════════════════════════════
   Quick View Modal
   ══════════════════════════════════════════════ */
.lk-qv {
	position: fixed;
	inset: 0;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.lk-qv--active {
	opacity: 1;
}

.lk-qv__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	cursor: pointer;
}

.lk-qv__container {
	position: relative;
	background: #fff;
	border-radius: 12px;
	width: 90vw;
	max-width: 900px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	z-index: 1;
	transform: translateY(20px);
	transition: transform 0.3s ease;
}

.lk-qv--active .lk-qv__container {
	transform: translateY(0);
}

.lk-qv__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.05);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	z-index: 5;
	transition: background 0.2s;
}

.lk-qv__close:hover {
	background: rgba(0, 0, 0, 0.1);
}

.lk-qv__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 300px;
}

/* Quick View Product Layout */
.lk-qv__product {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
}

.lk-qv__gallery {
	padding: 25px;
	background: var(--lk-color-bg-alt, #f5f5f5);
	border-radius: 12px 0 0 12px;
}

.lk-qv__main-image {
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 10px;
}

.lk-qv__main-image img {
	width: 100%;
	height: auto;
	display: block;
}

.lk-qv__main-image .lk-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
}

.lk-qv__thumbs {
	display: flex;
	gap: 8px;
}

.lk-qv__thumb {
	width: 60px;
	height: 60px;
	border: 2px solid transparent;
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
	padding: 0;
	background: #fff;
	transition: border-color 0.2s;
	opacity: 0.6;
}

.lk-qv__thumb--active,
.lk-qv__thumb:hover {
	border-color: var(--lk-color-primary, #ff4d00);
	opacity: 1;
}

.lk-qv__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Quick View Info */
.lk-qv__info {
	padding: 30px;
	display: flex;
	flex-direction: column;
}

.lk-qv__category {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--lk-color-text-light, #999);
	margin-bottom: 6px;
}

.lk-qv__title {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 10px;
	line-height: 1.3;
}

.lk-qv__title a {
	color: var(--lk-color-heading, #000);
	text-decoration: none;
}

.lk-qv__title a:hover {
	color: var(--lk-color-primary, #ff4d00);
}

.lk-qv__price {
	font-size: 22px;
	font-weight: 700;
	margin: 10px 0 15px;
}

.lk-qv__price del {
	font-size: 16px;
	color: var(--lk-color-text-light, #999);
	font-weight: 400;
}

.lk-qv__price ins {
	text-decoration: none;
	color: var(--lk-shop-sale-bg, #e53935);
}

.lk-qv__description {
	font-size: 14px;
	line-height: 1.6;
	color: var(--lk-color-text, #333);
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 1px solid var(--lk-color-border, #e5e5e5);
}

/* Quick View Cart Form */
.lk-qv__cart {
	margin-bottom: 15px;
}

.lk-qv__cart-form {
	display: flex;
	gap: 10px;
	align-items: center;
}

.lk-qv__cart-form .qty {
	width: 60px;
	height: 44px;
	text-align: center;
	border: 1px solid var(--lk-color-border, #e5e5e5);
	border-radius: 4px;
	font-size: 16px;
}

.lk-qv__add-to-cart {
	flex: 1;
	height: 44px;
}

.lk-qv__meta {
	margin-bottom: 12px;
}

.lk-qv__meta-item {
	font-size: 13px;
	color: var(--lk-color-text-light, #666);
	margin-bottom: 4px;
}

.lk-qv__meta-label {
	font-weight: 600;
	color: var(--lk-color-heading, #000);
}

.lk-qv__view-full {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 600;
	color: var(--lk-color-primary, #ff4d00);
	text-decoration: none;
	margin-top: auto;
	transition: gap 0.2s;
}

.lk-qv__view-full:hover {
	gap: 10px;
}

.lk-qv__error {
	padding: 40px;
	text-align: center;
	color: var(--lk-color-text-light, #666);
}

/* ══════════════════════════════════════════════
   Compare Modal
   ══════════════════════════════════════════════ */
.lk-compare-modal {
	position: fixed;
	inset: 0;
	z-index: 99989;
	opacity: 0;
	transition: opacity 0.3s;
}

.lk-compare-modal--active {
	opacity: 1;
}

.lk-compare-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	cursor: pointer;
}

.lk-compare-modal__container {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 12px;
	max-width: 1100px;
	max-height: 85vh;
	margin: 5vh auto 0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.lk-compare-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 25px;
	border-bottom: 1px solid var(--lk-color-border, #e5e5e5);
}

.lk-compare-modal__title {
	font-size: 20px;
	font-weight: 700;
	margin: 0;
}

.lk-compare-modal__close {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.05);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.2s;
}

.lk-compare-modal__close:hover {
	background: rgba(0, 0, 0, 0.1);
}

.lk-compare-modal__body {
	overflow: auto;
	padding: 20px 25px;
	flex: 1;
}

.lk-compare-modal__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
}

/* Compare Table */
.lk-compare-table-wrap {
	overflow-x: auto;
}

.lk-compare-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 600px;
}

.lk-compare-table__header {
	text-align: left;
	font-size: 13px;
	font-weight: 600;
	color: var(--lk-color-heading, #000);
	padding: 12px 15px;
	white-space: nowrap;
	width: 140px;
	vertical-align: top;
	background: var(--lk-color-bg-alt, #f9f9f9);
}

.lk-compare-table__cell {
	padding: 12px 15px;
	font-size: 14px;
	color: var(--lk-color-text, #333);
	border-bottom: 1px solid var(--lk-color-border, #f0f0f0);
	vertical-align: top;
	min-width: 180px;
}

.lk-compare-table__row--image .lk-compare-table__cell {
	text-align: center;
}

.lk-compare-table__product-img {
	position: relative;
	display: inline-block;
}

.lk-compare-table__product-img img {
	width: 120px;
	height: 120px;
	object-fit: cover;
	border-radius: 6px;
}

.lk-compare-remove {
	position: absolute;
	top: -6px;
	right: -6px;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #e53935;
	color: #fff;
	border: none;
	border-radius: 50%;
	font-size: 14px;
	cursor: pointer;
	transition: transform 0.2s;
}

.lk-compare-remove:hover {
	transform: scale(1.15);
}

.lk-compare-table__name {
	font-weight: 600;
	color: var(--lk-color-heading, #000);
	text-decoration: none;
	font-size: 15px;
}

.lk-compare-table__name:hover {
	color: var(--lk-color-primary, #ff4d00);
}

.lk-compare-stock--in {
	color: #43a047;
	font-weight: 500;
}

.lk-compare-stock--out {
	color: #e53935;
	font-weight: 500;
}

.lk-compare-empty {
	text-align: center;
	padding: 40px;
	color: var(--lk-color-text-light, #666);
}

/* ══════════════════════════════════════════════
   Compare Bar (sticky bottom)
   ══════════════════════════════════════════════ */
.lk-compare-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9990;
	background: #fff;
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
	border-top: 1px solid var(--lk-color-border, #e5e5e5);
}

.lk-compare-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 0;
	gap: 15px;
}

.lk-compare-bar__actions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   Wishlist Button States
   ══════════════════════════════════════════════ */
.lk-wishlist-btn--active svg {
	fill: #e53935;
	stroke: #e53935;
}

.lk-wishlist-btn--loading {
	opacity: 0.5;
	pointer-events: none;
}

.lk-compare-btn--active svg {
	color: var(--lk-color-primary, #ff4d00);
}

.lk-compare-btn--loading {
	opacity: 0.5;
	pointer-events: none;
}

/* ══════════════════════════════════════════════
   Toast Notification
   ══════════════════════════════════════════════ */
.lk-toast {
	position: fixed;
	bottom: 30px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	z-index: 99999;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	pointer-events: none;
}

.lk-toast--visible {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

.lk-toast__inner {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #333;
	color: #fff;
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	white-space: nowrap;
}

.lk-toast--added svg {
	color: #e53935;
}

/* ══════════════════════════════════════════════
   Wishlist Page
   ══════════════════════════════════════════════ */
.lk-wishlist-page__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 25px;
}

.lk-wishlist-page__header h2 {
	margin: 0;
}

.lk-wishlist-page__share {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--lk-color-text-light, #666);
}

.lk-wishlist-share {
	display: flex;
	align-items: center;
	color: var(--lk-color-text-light, #666);
	transition: color 0.2s;
}

.lk-wishlist-share:hover {
	color: var(--lk-color-primary, #ff4d00);
}

.lk-wishlist-grid {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.lk-wishlist-item {
	display: grid;
	grid-template-columns: 100px 1fr auto;
	gap: 20px;
	align-items: center;
	padding: 15px;
	background: #fff;
	border: 1px solid var(--lk-color-border, #e5e5e5);
	border-radius: 8px;
	transition: box-shadow 0.2s;
}

.lk-wishlist-item:hover {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.lk-wishlist-item__image img {
	width: 100%;
	height: auto;
	border-radius: 6px;
}

.lk-wishlist-item__title {
	font-size: 16px;
	margin: 0 0 6px;
}

.lk-wishlist-item__title a {
	color: var(--lk-color-heading, #000);
	text-decoration: none;
}

.lk-wishlist-item__title a:hover {
	color: var(--lk-color-primary, #ff4d00);
}

.lk-wishlist-item__stock--in {
	color: #43a047;
	font-size: 13px;
}

.lk-wishlist-item__stock--out {
	color: #e53935;
	font-size: 13px;
}

.lk-wishlist-item__actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.lk-wishlist-remove {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 1px solid var(--lk-color-border, #ddd);
	border-radius: 50%;
	cursor: pointer;
	color: var(--lk-color-text-light, #999);
	transition: all 0.2s;
}

.lk-wishlist-remove:hover {
	border-color: #e53935;
	color: #e53935;
}

.lk-wishlist-empty {
	text-align: center;
	padding: 60px 20px;
}

.lk-wishlist-empty svg {
	color: var(--lk-color-text-light, #ccc);
	margin-bottom: 15px;
}

.lk-wishlist-empty p {
	font-size: 16px;
	color: var(--lk-color-text-light, #666);
}

/* ══════════════════════════════════════════════
   Spinner
   ══════════════════════════════════════════════ */
.lk-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid var(--lk-color-border, #e5e5e5);
	border-top-color: var(--lk-color-primary, #ff4d00);
	border-radius: 50%;
	animation: lk-spin 0.7s linear infinite;
}

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

.lk-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
}

/* ══════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
	.lk-qv__product {
		grid-template-columns: 1fr;
	}

	.lk-qv__gallery {
		border-radius: 12px 12px 0 0;
	}

	.lk-qv__container {
		width: 95vw;
		max-height: 95vh;
	}

	.lk-compare-modal__container {
		margin: 2vh 10px 0;
		max-height: 90vh;
	}

	.lk-wishlist-item {
		grid-template-columns: 80px 1fr;
	}

	.lk-wishlist-item__actions {
		grid-column: 1 / -1;
		justify-content: flex-end;
	}

	.lk-compare-bar__inner {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}

	.lk-compare-bar__actions {
		justify-content: center;
	}

	.lk-toast {
		left: 10px;
		right: 10px;
		transform: translateX(0) translateY(20px);
	}

	.lk-toast--visible {
		transform: translateX(0) translateY(0);
	}

	.lk-toast__inner {
		justify-content: center;
	}
}
