/* Nik Wishlist & Ajax Mini Cart — front-end styles.
   Colors and radius come from CSS variables set in the plugin settings:
   --nik-wamc-primary, --nik-wamc-btn-text, --nik-wamc-counter,
   --nik-wamc-modal-bg, --nik-wamc-radius. */

:root {
	--nik-wamc-primary: #222222;
	--nik-wamc-btn-text: #ffffff;
	--nik-wamc-counter: #e02b20;
	--nik-wamc-modal-bg: #ffffff;
	--nik-wamc-radius: 4px;
}

/* ------------------------------------------------------------------ *
 * Fixed icons
 * ------------------------------------------------------------------ */

.nik-wamc-fixed {
	position: fixed;
	z-index: 9990;
	cursor: pointer;
	background: none;
	border: 0;
	padding: 0;
	line-height: 0;
	transition: opacity 0.3s;
}

.nik-wamc-fixed:hover {
	opacity: 0.65;
}

.nik-wamc-fixed img {
	width: 34px;
	height: auto;
}

.nik-wamc-fixed.pos-top-left { top: 100px; left: 25px; }
.nik-wamc-fixed.pos-top-right { top: 100px; right: 25px; }
.nik-wamc-fixed.pos-bottom-left { bottom: 100px; left: 25px; }
.nik-wamc-fixed.pos-bottom-right { bottom: 100px; right: 25px; }

.nik-wamc-counter {
	position: absolute;
	bottom: -4px;
	right: -8px;
	background: var(--nik-wamc-counter);
	color: #fff;
	font-size: 11px;
	line-height: 1;
	font-weight: 600;
	padding: 3px 6px;
	border-radius: 999px;
	min-width: 10px;
	text-align: center;
}

/* ------------------------------------------------------------------ *
 * Sliding panels (wishlist modal + mini cart)
 * ------------------------------------------------------------------ */

.nik-wamc-panel {
	position: fixed;
	top: 0;
	width: 400px;
	max-width: 92vw;
	height: 100vh;
	height: 100dvh;
	background: var(--nik-wamc-modal-bg);
	box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
	z-index: 99999;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	padding: 20px;
	transition: transform 0.3s ease;
}

.nik-wamc-panel.side-left { left: 0; transform: translateX(-110%); }
.nik-wamc-panel.side-right { right: 0; transform: translateX(110%); }
.nik-wamc-panel.is-open { transform: translateX(0); }

.nik-wamc-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 20px;
}

.nik-wamc-panel-title {
	font-size: 20px;
	font-weight: 600;
}

.nik-wamc-close {
	background: none;
	border: 0;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
	color: inherit;
	transition: transform 0.3s;
}

.nik-wamc-close:hover {
	transform: rotate(90deg);
}

.nik-wamc-panel-body {
	flex: 1 1 auto;
	overflow-y: auto;
	scrollbar-width: thin;
}

.nik-wamc-panel-foot {
	padding-top: 14px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.nik-wamc-overlay {
	position: fixed;
	inset: 0;
	z-index: 99990;
	background: rgba(0, 0, 0, 0.55);
}

body.nik-wamc-locked {
	overflow: hidden;
}

.nik-wamc-btn {
	display: block;
	background: var(--nik-wamc-primary);
	color: var(--nik-wamc-btn-text) !important;
	padding: 12px 16px;
	text-align: center;
	text-decoration: none !important;
	font-size: 15px;
	border-radius: var(--nik-wamc-radius);
	transition: opacity 0.3s;
	box-sizing: border-box;
}

.nik-wamc-btn:hover {
	opacity: 0.85;
}

/* Credit link (free version) */
.nik-wamc-credit {
	margin: 10px 0 0;
	text-align: center;
	font-size: 11px;
	opacity: 0.65;
}

.nik-wamc-credit a {
	color: inherit;
	text-decoration: none;
}

.nik-wamc-credit a:hover {
	text-decoration: underline;
}

/* Share row */
.nik-wamc-share-label {
	font-size: 13px;
	margin: 0 0 6px;
}

.nik-wamc-share-row {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	margin-bottom: 12px;
	word-break: break-all;
}

.nik-wamc-copy {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	line-height: 0;
	flex: 0 0 auto;
}

.nik-wamc-copy img {
	width: 20px;
}

.nik-wamc-copied {
	position: absolute;
	right: 0;
	top: -18px;
	color: #1a7f37;
	background: var(--nik-wamc-modal-bg);
	font-size: 12px;
	padding: 2px 4px;
	z-index: 3;
}

/* ------------------------------------------------------------------ *
 * Items inside panels (shared between wishlist modal and mini cart)
 * ------------------------------------------------------------------ */

.post-mini-cart-prod {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 10px 0;
	position: relative;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.post-mini-cart-prod > a,
.post-mini-cart-prod > img {
	flex: 0 0 110px;
}

.post-mini-cart-prod img {
	width: 110px;
	height: auto;
	object-fit: cover;
	object-position: center;
	border-radius: var(--nik-wamc-radius);
}

.ratio-10-5 .post-mini-cart-prod img { aspect-ratio: 10 / 5; }
.ratio-10-6 .post-mini-cart-prod img { aspect-ratio: 10 / 6; }
.ratio-10-7 .post-mini-cart-prod img { aspect-ratio: 10 / 7; }
.ratio-10-8 .post-mini-cart-prod img { aspect-ratio: 10 / 8; }
.ratio-10-9 .post-mini-cart-prod img { aspect-ratio: 10 / 9; }
.ratio-10-10 .post-mini-cart-prod img { aspect-ratio: 1 / 1; }
.ratio-9-10 .post-mini-cart-prod img { aspect-ratio: 9 / 10; }
.ratio-8-10 .post-mini-cart-prod img { aspect-ratio: 8 / 10; }
.ratio-7-10 .post-mini-cart-prod img { aspect-ratio: 7 / 10; }
.ratio-6-10 .post-mini-cart-prod img { aspect-ratio: 6 / 10; }
.ratio-5-10 .post-mini-cart-prod img { aspect-ratio: 5 / 10; }

.text-post-mini-cart-prod {
	flex: 1 1 auto;
	min-width: 0;
	padding-right: 20px;
	position: relative;
}

.titlepost-mini-cart-prod {
	text-decoration: none;
	display: block;
	font-size: 15px;
	color: inherit;
	padding-right: 10px;
}

.price-prod-mini-cart {
	display: block;
	padding: 8px 0;
	font-size: 14px;
}

.nik-wamc-line-total {
	display: block;
	padding-top: 8px;
	font-size: 13px;
	font-weight: 600;
}

.nik-wamc-cart-remove,
.nik-wamc-modal-remove {
	position: absolute;
	top: 0;
	right: -4px;
	background: none;
	border: 0;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: #999;
	padding: 2px;
	transition: color 0.2s;
}

.nik-wamc-cart-remove:hover,
.nik-wamc-modal-remove:hover {
	color: var(--nik-wamc-counter);
}

/* Quantity control */
.custom-quantity {
	display: flex;
	align-items: stretch;
}

.btn_quantity_custom {
	font-size: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 38px;
	background: #f1f1f1;
	color: #333;
	border: 0;
	cursor: pointer;
	transition: 0.3s;
	font-weight: 300;
}

.btn_quantity_custom:hover {
	color: var(--nik-wamc-btn-text);
	background: var(--nik-wamc-primary);
}

.custom-quantity input {
	width: 52px;
	font-size: 15px;
	padding: 6px;
	text-align: center;
	box-sizing: border-box;
	border: 1px solid #f1f1f1;
	-moz-appearance: textfield;
	appearance: textfield;
}

.custom-quantity input::-webkit-inner-spin-button,
.custom-quantity input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.nik-wamc-cart-total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 16px;
	font-weight: 600;
	padding-bottom: 14px;
	flex-wrap: wrap;
}

/* Loading state */
.is-loading {
	position: relative;
	pointer-events: none;
}

.is-loading::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 5;
	background: rgba(255, 255, 255, 0.6);
}

.is-loading::after,
.nik-wamc-loader {
	content: '';
	display: block;
	position: absolute;
	top: calc(50% - 14px);
	left: calc(50% - 14px);
	width: 28px;
	height: 28px;
	z-index: 6;
	border: 3px solid rgba(0, 0, 0, 0.15);
	border-top-color: var(--nik-wamc-primary);
	border-radius: 50%;
	animation: nik-wamc-spin 0.8s linear infinite;
}

.nik-wamc-page {
	position: relative;
	min-height: 120px;
}

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

/* ------------------------------------------------------------------ *
 * Wishlist toggle buttons on product cards
 * ------------------------------------------------------------------ */

.nik-wamc-toggle {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	line-height: 0;
	transition: opacity 0.3s, transform 0.15s;
}

.nik-wamc-toggle:hover {
	opacity: 0.65;
}

.nik-wamc-toggle:active {
	transform: scale(0.85);
}

.nik-wamc-toggle img {
	width: 28px !important;
	height: auto !important;
	margin: 0 !important;
}

ul.products li.product {
	position: relative;
}

.nik-wamc-loop-box {
	position: absolute;
	z-index: 3;
}

.nik-wamc-loop-box.pos-bottom-left { bottom: 8px; left: 8px; }
.nik-wamc-loop-box.pos-bottom-right { bottom: 8px; right: 8px; }
.nik-wamc-loop-box.pos-top-left { top: 8px; left: 8px; }
.nik-wamc-loop-box.pos-top-right { top: 8px; right: 8px; }

.nik-wamc-single-box {
	display: inline-block;
	vertical-align: middle;
	margin-left: 12px;
}

/* ------------------------------------------------------------------ *
 * Wishlist page grid
 * ------------------------------------------------------------------ */

.nik-wamc-grid {
	display: grid;
	gap: 32px;
}

.nik-wamc-cols-1 { grid-template-columns: 1fr; }
.nik-wamc-cols-2 { grid-template-columns: repeat(2, 1fr); }
.nik-wamc-cols-3 { grid-template-columns: repeat(3, 1fr); }
.nik-wamc-cols-4 { grid-template-columns: repeat(4, 1fr); }
.nik-wamc-cols-5 { grid-template-columns: repeat(5, 1fr); }
.nik-wamc-cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1024px) {
	.nik-wamc-cols-4, .nik-wamc-cols-5, .nik-wamc-cols-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
	.nik-wamc-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}

@media (max-width: 460px) {
	.nik-wamc-grid { grid-template-columns: 1fr; }
}

.nik-wamc-card {
	position: relative;
	margin: 0;
}

.nik-wamc-card .img-post-wishlist-product {
	width: 100%;
	height: auto;
	object-fit: cover;
	margin-bottom: 14px;
	border-radius: var(--nik-wamc-radius);
	display: block;
}

.nik-wamc-grid.ratio-10-5 .img-post-wishlist-product { aspect-ratio: 10 / 5; }
.nik-wamc-grid.ratio-10-6 .img-post-wishlist-product { aspect-ratio: 10 / 6; }
.nik-wamc-grid.ratio-10-7 .img-post-wishlist-product { aspect-ratio: 10 / 7; }
.nik-wamc-grid.ratio-10-8 .img-post-wishlist-product { aspect-ratio: 10 / 8; }
.nik-wamc-grid.ratio-10-9 .img-post-wishlist-product { aspect-ratio: 10 / 9; }
.nik-wamc-grid.ratio-10-10 .img-post-wishlist-product { aspect-ratio: 1 / 1; }
.nik-wamc-grid.ratio-9-10 .img-post-wishlist-product { aspect-ratio: 9 / 10; }
.nik-wamc-grid.ratio-8-10 .img-post-wishlist-product { aspect-ratio: 8 / 10; }
.nik-wamc-grid.ratio-7-10 .img-post-wishlist-product { aspect-ratio: 7 / 10; }
.nik-wamc-grid.ratio-6-10 .img-post-wishlist-product { aspect-ratio: 6 / 10; }
.nik-wamc-grid.ratio-5-10 .img-post-wishlist-product { aspect-ratio: 5 / 10; }

.nik-wamc-card-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	position: relative;
	padding-right: 38px;
}

.title-price-product-loop {
	text-decoration: none;
	color: inherit;
}

.title-post-wishlist-product {
	display: block;
	font-size: 15px;
	line-height: 1.35;
	padding-bottom: 6px;
}

.price-post-wishlist-product {
	display: block;
	font-size: 17px;
	font-weight: 600;
}

.nik-wamc-card .nik-wamc-add-cart {
	background: var(--nik-wamc-primary);
	color: var(--nik-wamc-btn-text) !important;
	border-radius: var(--nik-wamc-radius);
	text-align: center;
	text-decoration: none;
	padding: 10px 14px;
	font-size: 14px;
	align-self: flex-start;
}

.nik-wamc-card .nik-wamc-toggle {
	position: absolute;
	right: 0;
	bottom: 4px;
}

.nik-wamc-shared-note {
	padding: 10px 14px;
	background: rgba(0, 0, 0, 0.04);
	border-left: 3px solid var(--nik-wamc-primary);
	margin-bottom: 20px;
	font-size: 14px;
}

.nik-wamc-empty {
	padding: 24px 0;
	font-size: 15px;
	opacity: 0.75;
}

/* Ajax add-to-cart button state */
.single_add_to_cart_button.loading {
	opacity: 0.4;
}

@media (max-width: 767px) {
	.nik-wamc-panel {
		width: 100vw;
		max-width: 100vw;
	}
	.nik-wamc-fixed.pos-top-left,
	.nik-wamc-fixed.pos-top-right { top: 80px; }
	.nik-wamc-fixed.pos-top-left,
	.nik-wamc-fixed.pos-bottom-left { left: 14px; }
	.nik-wamc-fixed.pos-top-right,
	.nik-wamc-fixed.pos-bottom-right { right: 14px; }
}
