/**
 * Gemkibo — Premium mobile drawer (ecommerce)
 * Wzorzec: magic-gym / impactagencja koncept (eyebrow sekcje + lista ze strzałkami
 * + grid kategorii + szybkie akcje + karty kontakt), zaadaptowany pod sklep:
 * jasny motyw, emerald #009668, Playfair/Inter, slide z lewej.
 *
 * Scope: .gk-drawer--premium (wyższa specyficzność niż stare .gk-drawer w home.css —
 * nadpisuje niezależnie od kolejności ładowania, bez !important).
 * Enqueue: globalnie (functions.php), aby drawer był spójny na każdej podstronie.
 */

/* ── Bazowe mechaniki (samowystarczalne — działa na każdej stronie, nie
 *    tylko na home; bazowe reguły .gk-drawer żyją w home.css = home-only) ── */
/* .gk-drawer.gk-drawer--premium (0,2,0) bije home.css .gk-drawer (0,1,0) ładowane
   później — inaczej home wymuszał transition:opacity bez visibility-delay (brak OUT). */
.gk-drawer.gk-drawer--premium {
	position: fixed;
	inset: 0;
	z-index: 60;
	visibility: hidden;
	/* visibility opóźniona o 360ms na zamknięciu → panel zdąży wyjechać */
	transition: visibility 0s linear 360ms;
}
.gk-drawer.gk-drawer--premium.is-open {
	visibility: visible;
	transition: visibility 0s linear 0s;
}
.gk-drawer--premium .gk-drawer__backdrop { position: absolute; inset: 0; }
.gk-drawer--premium .gk-drawer__panel {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	transform: translateX(-100%);
	/* will-change → GPU layer ready przed animacją */
	will-change: transform;
	transition: transform 340ms var(--gk-ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}
.gk-drawer--premium.is-open .gk-drawer__panel { transform: translateX(0); }

/* ── Panel: szerszy, miękki cień, subtelny akcent ─────────────────────── */
.gk-drawer--premium .gk-drawer__panel {
	width: 88vw;
	max-width: 416px;
	background:
		radial-gradient(ellipse 80% 28% at 15% 100%, rgba(0, 150, 104, 0.07), transparent 72%),
		linear-gradient(180deg, #FAF8F4 0%, #FFFFFF 22%);
	box-shadow: 0 0 70px rgba(11, 28, 48, 0.22);
	padding: 0;
}
.gk-drawer--premium .gk-drawer__backdrop {
	background: rgba(31, 61, 20, 0.68);
	/* backdrop-filter tylko na desktopie — na mobilce kosztowny GPU hit */
}
@media (min-width: 768px) {
	.gk-drawer--premium .gk-drawer__backdrop {
		backdrop-filter: blur(4px);
		-webkit-backdrop-filter: blur(4px);
	}
}

/* Stagger — lekki, content pojawia się razem z wjeżdżającym panelem */
.gk-drawer--premium.is-open .gk-drawer__body > * {
	animation: gk-drawer-rise 300ms ease-out backwards;
	animation-delay: 60ms;
}
.gk-drawer--premium.is-open .gk-drawer__body > *:nth-child(n+3) { animation-delay: 110ms; }
.gk-drawer--premium.is-open .gk-drawer__body > *:nth-child(n+5) { animation-delay: 160ms; }
@keyframes gk-drawer-rise {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ── Head: małe logo + okrągły close emerald ──────────────────────────── */
.gk-drawer--premium .gk-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 18px;
	border-bottom: 1px solid rgba(11, 28, 48, 0.08);
	background: rgba(255, 255, 255, 0.7);
}
.gk-drawer--premium .gk-drawer__logo { display: inline-flex; align-items: center; }
.gk-drawer--premium .gk-drawer__head img,
.gk-drawer--premium .gk-drawer__logo img {
	height: 24px;
	width: auto;
	max-width: 150px;
	object-fit: contain;
	display: block;
}
.gk-drawer--premium .gk-drawer__close {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	border-radius: 50%;
	background: #009668;
	color: #fff;
	border: 0;
	margin: 0;
	padding: 0;
	display: grid;
	place-items: center;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 150, 104, 0.32);
	transition: background 200ms ease, transform 280ms var(--gk-ease-out), box-shadow 200ms ease;
}
.gk-drawer--premium .gk-drawer__close svg { width: 18px; height: 18px; }
.gk-drawer--premium .gk-drawer__close .material-symbols-outlined { font-size: 22px; color: #fff; }
.gk-drawer--premium .gk-drawer__close:hover,
.gk-drawer--premium .gk-drawer__close:focus-visible {
	background: #00754f;
	transform: rotate(90deg) scale(1.04);
	box-shadow: 0 10px 26px rgba(0, 150, 104, 0.46);
	outline: none;
}

/* ── Body: pionowy stos sekcji ────────────────────────────────────────── */
.gk-drawer--premium .gk-drawer__body {
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	display: flex;
	flex-direction: column;
	gap: 22px;
	padding: 20px 18px 8px;
}

/* ── Search box (ta wyszukiwarka, którą lubisz) — emerald focus + submit ── */
.gk-drawer--premium .gk-drawer__search { padding: 0; border: 0; margin: 0; }
.gk-drawer--premium .gk-drawer__search-box {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #FFFFFF;
	border: 1.5px solid rgba(11, 28, 48, 0.12);
	border-radius: 9999px;
	padding: 12px 8px 12px 18px;
	box-shadow: 0 2px 10px rgba(11, 28, 48, 0.04);
	transition: border-color 200ms ease, box-shadow 200ms ease;
}
.gk-drawer--premium .gk-drawer__search-box:focus-within {
	border-color: #009668;
	box-shadow: 0 4px 18px rgba(0, 150, 104, 0.16);
}
.gk-drawer--premium .gk-drawer__search-box > svg,
.gk-drawer--premium .gk-drawer__search-box .material-symbols-outlined {
	color: #009668;
	flex-shrink: 0;
}
.gk-drawer--premium .gk-drawer__search-box input[type="search"] {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: 0;
	outline: none;
	font-family: var(--gk-font-caps, 'Inter', sans-serif);
	font-size: 15px;
	color: #0b1c30;
}
.gk-drawer--premium .gk-drawer__search-box input::placeholder { color: #9ba8b8; }
.gk-drawer--premium .gk-drawer__search-go {
	flex: 0 0 38px;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #009668;
	color: #fff;
	border: 0;
	display: grid;
	place-items: center;
	cursor: pointer;
	transition: background 200ms ease, transform 200ms ease;
}
.gk-drawer--premium .gk-drawer__search-go svg { width: 18px; height: 18px; }
.gk-drawer--premium .gk-drawer__search-go:hover { background: #00754f; transform: scale(1.06); }

/* ── Sekcja + eyebrow ─────────────────────────────────────────────────── */
.gk-drawer--premium .gk-drawer__section {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 0;
	margin: 0;
	border: 0;
}
.gk-drawer--premium .gk-drawer__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--gk-font-caps, 'Inter', sans-serif);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #5b6b58;
	padding: 0 4px;
	margin-bottom: 6px;
}
.gk-drawer--premium .gk-drawer__eyebrow::before {
	content: '';
	width: 22px;
	height: 3px;
	border-radius: 2px;
	background: #009668;
	flex-shrink: 0;
}

/* ── Lista nawigacji (strzałki, hover slide) ──────────────────────────── */
.gk-drawer--premium .gk-drawer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	border: 0;
}
.gk-drawer--premium .gk-drawer__list > li { border: 0; }
.gk-drawer--premium .gk-drawer__list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: auto;
	gap: 10px;
	padding: 14px 16px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.65);
	border: 1px solid rgba(11, 28, 48, 0.06);
	font-family: var(--gk-font-caps, 'Inter', sans-serif);
	font-size: 1rem;
	font-weight: 600;
	/* !important: bije globalny reset .gk-home a:not(...) (~0,15,1) wymuszający color:inherit */
	color: #0b1c30 !important;
	text-decoration: none;
	transition: background 200ms ease, border-color 200ms ease, padding-left 200ms ease, color 200ms ease;
}
.gk-drawer--premium .gk-drawer__list a:hover,
.gk-drawer--premium .gk-drawer__list a:focus-visible {
	background: #E0F2EA;
	border-color: rgba(0, 150, 104, 0.35);
	color: #00754f !important;
	padding-left: 20px;
	outline: none;
}
.gk-drawer--premium .gk-drawer__list a .gk-drawer__arrow {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	color: #009668;
	opacity: 0.45;
	transition: transform 200ms ease, opacity 200ms ease;
}
.gk-drawer--premium .gk-drawer__list a:hover .gk-drawer__arrow,
.gk-drawer--premium .gk-drawer__list a:focus-visible .gk-drawer__arrow {
	opacity: 1;
	transform: translateX(3px);
}
.gk-drawer--premium .gk-drawer__list a.is-promo { color: #C97B0B !important; }
.gk-drawer--premium .gk-drawer__list a.is-promo .gk-drawer__arrow { color: #C97B0B; }
.gk-drawer--premium .gk-drawer__list a.is-promo:hover {
	background: #FFF4E0;
	border-color: rgba(201, 123, 11, 0.4);
	color: #C97B0B !important;
}
/* mniejsze itemy dla sekcji informacyjnej */
.gk-drawer--premium .gk-drawer__list--sm a { padding: 11px 16px; font-size: 0.94rem; font-weight: 500; }

/* ── Grid kategorii (chipy z ikoną) ───────────────────────────────────── */
.gk-drawer--premium .gk-drawer__cats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
}
.gk-drawer--premium .gk-drawer__cat {
	display: flex;
	align-items: center;
	min-height: 52px;
	padding: 12px 14px;
	border-radius: 14px;
	background: #1F3D14;
	border: 1px solid transparent;
	text-decoration: none;
	color: #fff !important;
	font-family: var(--gk-font-caps, 'Inter', sans-serif);
	font-size: 0.84rem;
	font-weight: 600;
	line-height: 1.25;
	transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.gk-drawer--premium .gk-drawer__cat:hover,
.gk-drawer--premium .gk-drawer__cat:focus-visible {
	background: #009668;
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 150, 104, 0.22);
	outline: none;
}

/* ── Szybkie akcje: Ulubione / Konto / Koszyk (3 równe kolumny) ───────── */
.gk-drawer--premium .gk-drawer__quick {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
}
.gk-drawer--premium .gk-drawer__quick-item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 14px 6px;
	border-radius: 14px;
	background: #1F3D14;
	color: #fff !important;
	text-decoration: none;
	font-family: var(--gk-font-caps, 'Inter', sans-serif);
	font-size: 0.74rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	transition: background 200ms ease, transform 200ms ease;
}
.gk-drawer--premium .gk-drawer__quick-item:hover,
.gk-drawer--premium .gk-drawer__quick-item:focus-visible {
	background: #009668;
	transform: translateY(-2px);
	outline: none;
}
.gk-drawer--premium .gk-drawer__quick-item svg { width: 22px; height: 22px; }
.gk-drawer--premium .gk-drawer__quick-item .material-symbols-outlined { font-size: 22px; color: #fff; }
.gk-drawer--premium .gk-drawer__quick-badge {
	position: absolute;
	top: 8px;
	right: calc(50% - 26px);
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9999px;
	background: #FBB900;
	color: #1F3D14;
	font-size: 11px;
	font-weight: 800;
	line-height: 18px;
	text-align: center;
}

/* ── Karty kontakt (stopka drawera) ───────────────────────────────────── */
.gk-drawer--premium .gk-drawer__contact {
	display: flex;
	flex-direction: row;
	gap: 8px;
	margin: 4px 0 0;
	padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid rgba(11, 28, 48, 0.08);
	background: rgba(250, 248, 244, 0.8);
}
.gk-drawer--premium .gk-drawer__contact a {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 11px 6px;
	border-radius: 12px;
	background: #FFFFFF;
	border: 1px solid rgba(11, 28, 48, 0.08);
	color: #0b1c30 !important;
	text-decoration: none;
	font-family: var(--gk-font-caps, 'Inter', sans-serif);
	font-size: 0.78rem;
	font-weight: 600;
	white-space: nowrap;
	transition: border-color 200ms ease, background 200ms ease;
}
.gk-drawer--premium .gk-drawer__contact a span {
	overflow: hidden;
	text-overflow: ellipsis;
}
.gk-drawer--premium .gk-drawer__contact a:hover { background: #E0F2EA; border-color: rgba(0, 150, 104, 0.35); }
.gk-drawer--premium .gk-drawer__contact a svg,
.gk-drawer--premium .gk-drawer__contact a .material-symbols-outlined {
	color: #009668;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	font-size: 18px;
}

/* Gdy drawer otwarty — ukryj floating cart (z-100 nachodził na wiersz kontaktu). */
body:has(.gk-drawer.gk-drawer--premium.is-open) #gk-floating-cart { display: none !important; }

/* ── Reduced motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.gk-drawer--premium.is-open .gk-drawer__body > *,
	.gk-drawer--premium .gk-drawer__close,
	.gk-drawer--premium .gk-drawer__list a,
	.gk-drawer--premium .gk-drawer__cat { animation: none !important; transition: none !important; }
}
