/*!
 * Storzen — Wishlist
 */

/* ════════════════════════════════════════════════════════════════════════
 * Heart button
 * ════════════════════════════════════════════════════════════════════════ */
.sz-wishlist-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid #e5e7eb;
	color: #6b7280;
	width: 38px;
	height: 38px;
	padding: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: border-color .15s ease, color .15s ease, background .15s ease, transform .15s ease;
	font-family: inherit;
	vertical-align: middle;
}
.sz-wishlist-btn:hover {
	border-color: #ef4444;
	color: #ef4444;
	transform: translateY(-1px);
}
.sz-wishlist-btn:focus-visible {
	outline: 2px solid #ef4444;
	outline-offset: 2px;
}
.sz-wishlist-btn:active {
	transform: scale(.95);
}
.sz-wishlist-btn.is-added {
	background: #fee2e2;
	border-color: #ef4444;
	color: #dc2626;
}
.sz-wishlist-btn.is-added:hover {
	background: #fecaca;
}

/* Icon toggle — outline (default) vs filled (added) */
.sz-wishlist-btn__icon        { display: inline-block; font-size: 16px; line-height: 1; }
.sz-wishlist-btn__icon--filled { display: none; font-size: 16px; line-height: 1; }
.sz-wishlist-btn.is-added .sz-wishlist-btn__icon         { display: none; }
.sz-wishlist-btn.is-added .sz-wishlist-btn__icon--filled { display: inline-block; }

/* "Pop" animation when added */
@keyframes sz-wishlist-pop {
	0%, 100% { transform: scale(1); }
	30%      { transform: scale(1.25); }
	60%      { transform: scale(.92); }
}
.sz-wishlist-btn.is-just-added .sz-wishlist-btn__icon--filled {
	animation: sz-wishlist-pop .45s ease;
}

/* Single product: full-width "Add to wishlist" pill alongside ATC */
.woocommerce-product-details__short-description + .sz-wishlist-btn,
.cart .sz-wishlist-btn,
.szp-price-vat + .sz-wishlist-btn {
	width: auto;
	padding: 0 16px;
	border-radius: 8px;
	height: 44px;
	gap: 6px;
}
.woocommerce-product-details__short-description + .sz-wishlist-btn::after,
.szp-price-vat + .sz-wishlist-btn::after {
	content: attr(aria-label);
	font-size: 13px;
	font-weight: 500;
}

/* Compact variant inside card overlays */
.social-style-two .sz-wishlist-btn {
	width: 32px;
	height: 32px;
	background: #fff;
}

/* ════════════════════════════════════════════════════════════════════════
 * Wishlist page (grid layout)
 * ════════════════════════════════════════════════════════════════════════ */
.sz-wishlist-wrap {
	margin: 20px 0;
}
.sz-wishlist-notice {
	background: #fef3c7;
	border: 1px solid #fcd34d;
	color: #92400e;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	margin-bottom: 16px;
}

.sz-wishlist-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid #e5e7eb;
	flex-wrap: wrap;
}
.sz-wishlist-title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: #111827;
}
.sz-wishlist-count {
	color: #ef4444;
	font-weight: 600;
	margin-left: 6px;
}
.sz-wishlist-actions {
	display: flex;
	gap: 8px;
}
.sz-wishlist-share,
.sz-wishlist-clear {
	background: transparent;
	border: 1px solid #e5e7eb;
	color: #4b5563;
	padding: 8px 14px;
	font-size: 13px;
	font-weight: 500;
	border-radius: 6px;
	cursor: pointer;
	transition: border-color .15s ease, color .15s ease, background .15s ease;
	font-family: inherit;
}
.sz-wishlist-share:hover {
	border-color: #FF3636;
	color: #FF3636;
}
.sz-wishlist-clear:hover {
	border-color: #dc2626;
	color: #dc2626;
}

.sz-wishlist-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 20px;
}

.sz-wishlist-item {
	position: relative;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
	display: flex;
	flex-direction: column;
}
.sz-wishlist-item:hover {
	border-color: #d1d5db;
	box-shadow: 0 8px 20px rgba(0, 0, 0, .06);
	transform: translateY(-2px);
}
.sz-wishlist-item__remove {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	background: rgba(255, 255, 255, .92);
	border: 1px solid rgba(0, 0, 0, .05);
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	color: #6b7280;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s ease, color .15s ease;
}
.sz-wishlist-item__remove:hover {
	background: #fee2e2;
	color: #dc2626;
}

.sz-wishlist-item__thumb {
	display: block;
	aspect-ratio: 1;
	background: #f9fafb;
	overflow: hidden;
}
.sz-wishlist-item__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .35s ease;
}
.sz-wishlist-item:hover .sz-wishlist-item__thumb img {
	transform: scale(1.05);
}

.sz-wishlist-item__body {
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}
.sz-wishlist-item__name {
	color: #111827;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.sz-wishlist-item__name:hover {
	color: #FF3636;
}
.sz-wishlist-item__price {
	font-size: 15px;
	font-weight: 700;
	color: #1f2937;
}
.sz-wishlist-item__price del {
	color: #9ca3af;
	font-weight: 500;
	margin-right: 4px;
}
.sz-wishlist-item__stock {
	margin-top: 2px;
}
.sz-wishlist-stock {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 7px;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: .3px;
}
.sz-wishlist-stock--in  { background: #d1fae5; color: #065f46; }
.sz-wishlist-stock--out { background: #fee2e2; color: #991b1b; }

.sz-wishlist-item__atc {
	margin-top: auto;
	display: block;
	background: #FF3636;
	color: #fff;
	padding: 9px 14px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	transition: background .15s ease;
}
.sz-wishlist-item__atc:hover {
	background: #E62E2E;
	color: #fff;
}
.sz-wishlist-item__atc[aria-disabled="true"] {
	background: #d1d5db;
	color: #6b7280;
	pointer-events: none;
}

.sz-wishlist-empty {
	text-align: center;
	padding: 60px 20px;
	color: #6b7280;
	font-size: 15px;
	background: #f9fafb;
	border-radius: 10px;
	border: 1px dashed #d1d5db;
	margin: 20px 0;
}

/* ════════════════════════════════════════════════════════════════════════
 * Header counter (via [storzen_wishlist_count] shortcode)
 * ════════════════════════════════════════════════════════════════════════ */
.sz-wishlist-counter {
	display: inline-block;
	min-width: 18px;
	padding: 0 5px;
	background: #ef4444;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	border-radius: 9px;
	margin-left: 4px;
	vertical-align: middle;
}
.sz-wishlist-counter[data-empty="1"] {
	background: #9ca3af;
}

/* ════════════════════════════════════════════════════════════════════════
 * Toast (errors / share-copied confirmations)
 * ════════════════════════════════════════════════════════════════════════ */
.sz-wishlist-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	background: #1f2937;
	color: #fff;
	padding: 10px 18px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
	z-index: 10000;
	max-width: 90vw;
	text-align: center;
}
.sz-wishlist-toast--success {
	background: #16a34a;
}

/* ════════════════════════════════════════════════════════════════════════
 * Mobile
 * ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
	.sz-wishlist-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}
	.sz-wishlist-title { font-size: 18px; }
	.sz-wishlist-item__body { padding: 10px; }
	.sz-wishlist-item__name { font-size: 13px; }
	.sz-wishlist-item__price { font-size: 14px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.sz-wishlist-btn,
	.sz-wishlist-item,
	.sz-wishlist-item__thumb img {
		transition: none !important;
		animation: none !important;
	}
}
