/*
 * Wishlist drawer — global component CSS.
 *
 * IMMUTABLE — wydzielony plik per user mandate 2026-05-28:
 * "popraw drawery te przyciski bo sa rozwalone... jak masz style dla drawer favorite
 * to moze warto dac oddzielne style".
 *
 * Hardcoded hex (NIE var(--gk-color-*)) bo zmienne w home.css scope .gk-home —
 * na PDP/listingu/innych stronach nie działały → buttons transparent + niewidoczne.
 *
 * Markup: `inc/template-parts/site-header.php` (#gk-wishlist-drawer).
 * JS handler: `assets/js/home.js` openWishlistDrawer / closeWishlistDrawer.
 */

.gk-wishlist-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(420px, 100vw);
	z-index: 100;
	background: #ffffff;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
	box-shadow: -20px 0 60px rgba(0, 0, 0, 0.20);
}
.gk-wishlist-drawer.is-open {
	transform: translateX(0);
}

.gk-wishlist-drawer__backdrop {
	position: fixed;
	inset: 0;
	z-index: 99;
	background: rgba(31, 61, 20, 0.45);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 300ms ease;
}
.gk-wishlist-drawer__backdrop.is-open {
	opacity: 1;
	pointer-events: auto;
}

.gk-wishlist-drawer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 22px 24px;
	border-bottom: 1px solid #EEEEEE;
	flex-shrink: 0;
}
.gk-wishlist-drawer__title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 20px;
	font-weight: 700;
	color: #1F3D14;
	margin: 0;
	letter-spacing: -0.01em;
}
.gk-wishlist-drawer__count {
	font-size: 13px;
	color: #6B7280;
	margin-left: 8px;
	font-weight: 500;
}
.gk-wishlist-drawer__close {
	all: unset;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 9999px;
	background: #F3F4F0;
	color: #1F3D14;
	cursor: pointer;
	transition: background .2s ease;
}
.gk-wishlist-drawer__close:hover {
	background: #E2E6DD;
}
.gk-wishlist-drawer__close svg {
	display: block;
	pointer-events: none;
}

.gk-wishlist-drawer__body {
	flex: 1;
	overflow-y: auto;
	padding: 12px 0;
	-webkit-overflow-scrolling: touch;
}

/* Empty state */
.gk-wishlist-drawer__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	min-height: 320px;
	padding: 48px 24px;
	text-align: center;
}
.gk-wishlist-drawer__empty-title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 18px;
	font-weight: 700;
	color: #1F3D14;
	margin: 0;
}
.gk-wishlist-drawer__empty-text {
	font-size: 14px;
	color: #6B7280;
	max-width: 280px;
	margin: 0;
	line-height: 1.5;
}
.gk-wishlist-drawer__empty-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	background: #1F3D14;
	color: #ffffff;
	border-radius: 9999px;
	font-weight: 600;
	font-size: 14px;
	margin-top: 8px;
	text-decoration: none;
	transition: background .2s ease;
}
.gk-wishlist-drawer__empty-cta:hover {
	background: #5DA935;
	color: #ffffff;
}

/* Item */
.gk-wishlist-drawer__item {
	display: grid;
	grid-template-columns: 72px 1fr auto;
	gap: 14px;
	padding: 14px 24px;
	align-items: start;
	border-bottom: 1px solid #F5F5F5;
}
.gk-wishlist-drawer__item:last-child {
	border-bottom: 0;
}
.gk-wishlist-drawer__item.is-removing {
	opacity: 0.4;
	pointer-events: none;
	transition: opacity .25s ease;
}
.gk-wishlist-drawer__item-image {
	width: 72px;
	height: 72px;
	border-radius: 12px;
	background: #F9F9F9;
	overflow: hidden;
	display: block;
}
.gk-wishlist-drawer__item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.gk-wishlist-drawer__item-info {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}
.gk-wishlist-drawer__item-title {
	font-size: 14px;
	font-weight: 700;
	color: #1F3D14;
	line-height: 1.35;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.gk-wishlist-drawer__item-title a {
	color: inherit;
	text-decoration: none;
}
.gk-wishlist-drawer__item-price {
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 15px;
	font-weight: 800;
	color: #009668;
	letter-spacing: -0.01em;
}
.gk-wishlist-drawer__item-actions {
	display: flex;
	gap: 8px;
	margin-top: 4px;
}
.gk-wishlist-drawer__action-cart {
	all: unset;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	background: #1F3D14;
	color: #ffffff;
	border-radius: 9999px;
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	transition: background .2s ease;
}
.gk-wishlist-drawer__action-cart:hover {
	background: #5DA935;
}
.gk-wishlist-drawer__action-cart.is-added {
	background: #009668;
	pointer-events: none;
}
.gk-wishlist-drawer__action-cart svg {
	display: block;
	pointer-events: none;
}
.gk-wishlist-drawer__action-soldout {
	font-size: 12px;
	font-weight: 600;
	color: #DC2626;
	padding: 8px 14px;
}
.gk-wishlist-drawer__item-remove {
	all: unset;
	background: transparent;
	width: 28px;
	height: 28px;
	border-radius: 9999px;
	color: #9CA3AF;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color .2s ease, background .2s ease;
}
.gk-wishlist-drawer__item-remove:hover {
	color: #DC2626;
	background: #FEE2E2;
}
.gk-wishlist-drawer__item-remove svg {
	display: block;
	pointer-events: none;
}

/* Footer + CTA */
.gk-wishlist-drawer__footer {
	flex-shrink: 0;
	padding: 18px 24px 24px;
	border-top: 1px solid #EEEEEE;
	background: #FAFAFA;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.gk-wishlist-drawer__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 52px;
	border-radius: 9999px;
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.01em;
	transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
	cursor: pointer;
	border: 0;
	text-decoration: none;
	box-sizing: border-box;
}
.gk-wishlist-drawer__cta--primary {
	background: #1F3D14;
	color: #ffffff;
	box-shadow: 0 8px 24px rgba(31, 61, 20, 0.20);
}
.gk-wishlist-drawer__cta--primary:hover {
	background: #5DA935;
	color: #ffffff;
	transform: translateY(-1px);
	box-shadow: 0 12px 32px rgba(31, 61, 20, 0.28);
}
.gk-wishlist-drawer__cta--secondary {
	background: transparent;
	color: #1F3D14;
	border: 1.5px solid #1F3D14;
}
.gk-wishlist-drawer__cta--secondary:hover {
	background: #1F3D14;
	color: #ffffff;
}
.gk-wishlist-drawer__cta svg {
	display: block;
	pointer-events: none;
}

.gk-wishlist-drawer.is-loading .gk-wishlist-drawer__body {
	opacity: 0.5;
	pointer-events: none;
}

/* Notice — skipped products list po "Dodaj wszystkie" (np. OOS / wariant) */
.gk-wishlist-drawer__notice {
	background: #FEF3C7;
	border: 1px solid #FCD34D;
	border-radius: 12px;
	padding: 12px 14px;
	margin-bottom: 12px;
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 12px;
	color: #78350F;
	line-height: 1.5;
}
.gk-wishlist-drawer__notice strong {
	display: block;
	margin-bottom: 6px;
	font-weight: 700;
	color: #92400E;
}
.gk-wishlist-drawer__notice ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.gk-wishlist-drawer__notice li {
	padding: 2px 0;
}
.gk-wishlist-drawer__notice li::before {
	content: "• ";
	color: #D97706;
	font-weight: 700;
}
