/**
 * SpeedSzop — Lista życzeń — style frontendowe.
 * Konwencje: klasy BEM z prefiksem ss- / ssw-, zmienne CSS z prefiksem --ss- (z fallbackami).
 */

/* --------------------------------------------------------------------
 * Serce na miniaturce karty produktu (overlay)
 * ------------------------------------------------------------------ */
.ss-wishlist-heart {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba( 255, 255, 255, 0.9 );
	border: none;
	cursor: pointer;
	color: var( --ss-text-muted, #4B5563 );
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.12 );
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
	padding: 0;
}

.ss-wishlist-heart:hover {
	background: #fff;
	transform: scale( 1.05 );
}

.ss-wishlist-heart svg {
	width: 18px;
	height: 18px;
	pointer-events: none;
}

.ss-wishlist-heart.is-active {
	color: #DC2626;
}

.ss-wishlist-heart.is-active svg {
	fill: #DC2626;
}

.ss-wishlist-heart.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

/* --------------------------------------------------------------------
 * Ikona i licznik w headerze motywu
 * ------------------------------------------------------------------ */
.ss-wishlist-icon {
	position: relative;
}

.ss-wishlist-badge {
	position: absolute;
	top: 2px;
	right: 0;
	background: #DC2626;
	color: #fff;
	font-size: 10.5px;
	font-weight: 700;
	min-width: 17px;
	height: 17px;
	border-radius: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
}

.ss-wishlist-badge--hidden {
	display: none;
}

.ss-wishlist-count {
	line-height: 1;
}

/* --------------------------------------------------------------------
 * Przycisk na stronie pojedynczego produktu
 * ------------------------------------------------------------------ */
.ssw-single-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
}

.ssw-single-btn svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.ssw-single-btn.is-active {
	color: #DC2626;
	border-color: #DC2626;
}

.ssw-single-btn.is-active svg {
	fill: #DC2626;
	stroke: #DC2626;
}

.ssw-single-btn.is-loading {
	opacity: 0.65;
	pointer-events: none;
}

.ssw-single-btn__label {
	white-space: nowrap;
}

/* --------------------------------------------------------------------
 * Siatka produktów na stronie „Lista życzeń” w Moje konto
 * (samodzielna definicja — nie zależy od obecności motywu)
 * ------------------------------------------------------------------ */
.ssw-wishlist-grid {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 24px;
	margin-top: 8px;
}

@media ( max-width: 900px ) {
	.ssw-wishlist-grid {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media ( max-width: 600px ) {
	.ssw-wishlist-grid {
		grid-template-columns: 1fr;
	}
}

.ssw-wishlist-grid__item {
	position: relative;
	border: 1px solid var( --ss-border, #E5E7EB );
	border-radius: 12px;
	padding: 16px;
	background: #fff;
}

.ssw-wishlist-grid__link {
	display: block;
	text-decoration: none;
	color: var( --ss-text, #1F2937 );
}

.ssw-wishlist-grid__image img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	display: block;
}

.ssw-wishlist-grid__title {
	font-size: 15px;
	font-weight: 700;
	margin: 12px 0 6px;
	color: var( --ss-text, #1F2937 );
}

.ssw-wishlist-grid__price {
	font-weight: 700;
	color: var( --ss-blue, #2141B7 );
}

.ssw-wishlist-grid .ss-wishlist-heart {
	top: 26px;
	right: 26px;
}

/* --------------------------------------------------------------------
 * Pusty stan listy życzeń
 * ------------------------------------------------------------------ */
.ssw-empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 16px;
	padding: 48px 20px;
	border: 1px dashed var( --ss-border, #E5E7EB );
	border-radius: 12px;
	background: var( --ss-bg-light, #F5F7FB );
}

.ssw-empty-state__text {
	font-size: 15px;
	color: var( --ss-text-muted, #4B5563 );
	margin: 0;
}

.ssw-empty-state__btn {
	text-decoration: none;
}
