/*
 * Gemkibo Product Card — UNIFIED V8 (2026-05-28)
 *
 * Single global BEM component reused across:
 *   - Home bestsellers + products-new
 *   - Shop archive (category, tag, shop, promocje, bestsellery)
 *   - PDP related products
 *
 * Variants (mutex):
 *   .gk-product-card                        - default
 *   .gk-product-card--premium               - full image 4:5 + overlay tags + brand CTA (DEFAULT for archive + home)
 *   .gk-product-card--featured              - col-span-2 horizontal layout (listing slot)
 *   .gk-product-card--compact               - smaller (related products PDP)
 *
 * State:
 *   .gk-product-card--on-sale               - sale price visible
 *   .gk-product-card--out-of-stock          - oos disable CTA + opacity
 *
 * Research-backed (KB www/conversion-ui-elements-research-backed.md):
 *   - 4:5 ratio image +14% engagement (Baymard 2023)
 *   - Visible CTA +28% (Baymard 2024)
 *   - Star rating only ≥5 reviews (Spiegel 2017)
 *   - Omnibus 30d compliance (UOKiK 2023 / EU 2161)
 *   - OOS disabled CTA (NN/g 2024 expectation pattern)
 *
 * Vanilla CSS, no Tailwind.
 */

/* ═══════════════════════════════════════════════════════════════
 * TOKENS — local to .gk-product-card (no global pollution)
 * Hardcoded fallbacks make this self-contained.
 * ═══════════════════════════════════════════════════════════════ */
.gk-product-card {
	--gkpc-brand:          #5DA935;
	--gkpc-brand-hover:    #4F9028;
	--gkpc-brand-dark:     #1F3D14;
	--gkpc-emerald:        #009668;
	--gkpc-cream:          #FAF8F4;
	--gkpc-warning-pill:   #FBB900;
	--gkpc-stock-low:      #C97B0B;
	--gkpc-danger:         #DC2626;
	--gkpc-text-dark:      #0b1c30;
	--gkpc-text:           #111827;
	--gkpc-text-muted:     #4B5563;
	--gkpc-text-soft:      #6B7280;
	--gkpc-text-faint:     #9CA3AF;
	--gkpc-border:         #EEEEEE;
	--gkpc-radius-card:    20px;
	--gkpc-radius-pill:    9999px;
	--gkpc-shadow-cta:     0 12px 32px rgba(93, 169, 53, 0.30);
	--gkpc-shadow-default: 0 1px 3px rgba(0,0,0,0.05), 0 8px 20px -6px rgba(31, 61, 20, 0.10);
	--gkpc-shadow-hover:   0 2px 6px rgba(0,0,0,0.06), 0 20px 40px -10px rgba(31, 61, 20, 0.22);
	--gkpc-ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
	--gkpc-font-display:   'Playfair Display', Georgia, serif;
	--gkpc-font-caps:      'Inter', 'Open Sans', sans-serif;
	--gkpc-ls-caps:        0.08em;

	/* Polish 16 — bento z białym tłem + border + shadow + radius + body padding 18px (per user mandate 2026-05-28) */
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;            /* Polish #153 — equal-height inside flex parent */
	background: #ffffff;
	border: 1px solid rgba(31, 61, 20, 0.08);
	border-radius: var(--gkpc-radius-card);
	box-shadow:
		0 1px 3px rgba(0, 0, 0, 0.04),
		0 8px 24px -8px rgba(31, 61, 20, 0.10);
	text-align: left;
	cursor: pointer;
	overflow: hidden;
	transition:
		transform 300ms var(--gkpc-ease-out),
		box-shadow 300ms var(--gkpc-ease-out),
		border-color 300ms ease;
}

.gk-product-card:hover {
	transform: translateY(-4px);
	border-color: rgba(93, 169, 53, 0.30);
	box-shadow:
		0 4px 12px rgba(0, 0, 0, 0.06),
		0 20px 40px -12px rgba(31, 61, 20, 0.20);
}

/* Media — bez border + bez radius własnego (parent card overflow:hidden) */
.gk-product-card__media {
	border: 0 !important;
	border-radius: 0 !important;
	margin: 0 !important;
}

/* Body — padding wokół content żeby tekst i przycisk nie stykały się z krawędzią.
   Polish 16 — !important bo strona-glowna.css / shop-archive.css overrides z poprzednich polishów. */
.gk-product-card .gk-product-card__body,
.gk-product-card--premium .gk-product-card__body {
	padding: 18px 20px 20px !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 10px !important;
	flex-grow: 1 !important;
}

/* ═══════════════════════════════════════════════════════════════
 * MEDIA — square 1:1 default; premium variant uses 4:5
 * ═══════════════════════════════════════════════════════════════ */
.gk-product-card__media {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	margin: 0 0 20px;
	background: var(--gkpc-cream);
	border: 1px solid rgba(11, 28, 48, 0.08);
	border-radius: var(--gkpc-radius-card);
	overflow: hidden;
	text-decoration: none;
}

.gk-product-card--premium .gk-product-card__media {
	aspect-ratio: 4 / 5;
}

.gk-product-card__image,
.gk-product-card__media img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	padding: 0 !important;
	display: block;
	transition: transform 600ms var(--gkpc-ease-out), opacity 400ms ease;
}

.gk-product-card:hover .gk-product-card__image,
.gk-product-card:hover .gk-product-card__media img {
	transform: scale(1.05);
}

/* Hover secondary image swap (Baymard 2023 +21%) */
.gk-product-card__image--primary { opacity: 1; }
.gk-product-card__image--secondary {
	position: absolute;
	inset: 0;
	opacity: 0;
}
.gk-product-card:hover .gk-product-card__image--secondary { opacity: 1; }
.gk-product-card:hover .gk-product-card__image--primary:not(:only-of-type) { opacity: 0; }

/* ═══════════════════════════════════════════════════════════════
 * TAG (suplement diety) — top-left overlay z dotem
 * ═══════════════════════════════════════════════════════════════ */
.gk-product-card__tag {
	position: absolute;
	top: 14px;
	left: 14px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	background: rgba(255, 255, 255, 0.92);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border-radius: var(--gkpc-radius-pill);
	font-family: var(--gkpc-font-caps);
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: var(--gkpc-ls-caps);
	color: var(--gkpc-text-dark);
	z-index: 2;
	line-height: 1;
}

.gk-product-card__tag-dot {
	width: 6px;
	height: 6px;
	background: var(--gkpc-brand);
	border-radius: 50%;
	flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
 * BADGES STACK — top-right vertical (max 2 stacked)
 *   PROMOCJA → BESTSELLER → NOWOŚĆ priority
 * ═══════════════════════════════════════════════════════════════ */
.gk-product-card__badges {
	position: absolute;
	top: 14px;
	right: 14px;
	left: auto;
	display: flex;
	flex-direction: row;
	gap: 6px;
	z-index: 3;
	pointer-events: none;
	align-items: center;
}
/* Polish 17 — wszystkie badges w prawym górnym rogu, horizontal stack:
   bestseller / new (left) → promo (right corner). Heart przeniesiony na top-left. */
.gk-product-card__badges--right {
	right: 14px !important;
	left: auto !important;
	flex-direction: row !important;
}

.gk-product-card__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 5px 11px;
	background: var(--gkpc-brand-dark);
	color: #fff;
	border-radius: var(--gkpc-radius-pill);
	font-family: var(--gkpc-font-caps);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	line-height: 1;
	box-shadow: 0 2px 8px rgba(0,0,0,0.15);
	pointer-events: auto;
	white-space: nowrap;
}

.gk-product-card__badge--promo {
	background: var(--gkpc-danger);
}

.gk-product-card__badge--bestseller {
	background: var(--gkpc-brand-dark);
}

.gk-product-card__badge--new {
	background: var(--gkpc-brand);
}

/* ═══════════════════════════════════════════════════════════════
 * WISHLIST — top-right overlay (hover reveal desktop, always mobile)
 *   When badges are present, wishlist nests below them.
 * ═══════════════════════════════════════════════════════════════ */
/* Polish 17 — heart wishlist → top-LEFT (per user mandate 2026-05-28) */
.gk-product-card__wishlist-wrap {
	position: absolute !important;
	top: 10px !important;
	left: 10px !important;
	right: auto !important;
	bottom: auto !important;
	z-index: 4;
}

/* Override: NIE push wishlist gdy są badges — heart trzyma się top-left, badges top-right */
.gk-product-card__badges + .gk-product-card__wishlist-wrap,
.gk-product-card:has(.gk-product-card__badges) .gk-product-card__wishlist-wrap {
	top: 10px !important;
	bottom: auto !important;
	left: 10px !important;
	right: auto !important;
}

.gk-product-card__wishlist-wrap a,
.gk-product-card__wishlist-wrap button,
.gk-product-card__wishlist-wrap .yith-wcwl-add-to-wishlist a,
.gk-product-card__wishlist-wrap .yith-wcwl-add-to-wishlist-button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0 !important;
	background: rgba(255, 255, 255, 0.95) !important;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border: 0 !important;
	border-radius: 50% !important;
	color: var(--gkpc-text-dark) !important;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0,0,0,0.12);
	transition: color 200ms ease, transform 200ms ease, background 200ms ease;
}

.gk-product-card__wishlist-wrap a:hover,
.gk-product-card__wishlist-wrap button:hover {
	color: var(--gkpc-brand) !important;
	background: rgba(255, 255, 255, 1) !important;
	transform: scale(1.05);
}

/* YITH labels hide */
.gk-product-card__wishlist-wrap .yith-wcwl-add-to-wishlist-button__label,
.gk-product-card__wishlist-wrap .yith-wcwl-add-to-wishlist-button-tooltip,
.gk-product-card__wishlist-wrap .yith-wcwl-add-to-wishlist-button__text {
	display: none !important;
}

.gk-product-card__wishlist-wrap .yith-wcwl-icon-svg__wrapper {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
}

.gk-product-card__wishlist-wrap .yith-wcwl-icon-svg {
	width: 18px !important;
	height: 18px !important;
	stroke: currentColor !important;
}

.gk-product-card__wishlist-wrap .yith-add-to-wishlist-button-block {
	display: inline-flex;
	background: transparent !important;
}

/* Filled state — already on wishlist */
.gk-product-card__wishlist-wrap .yith-wcwl-icon-fill,
.gk-product-card__wishlist-wrap button[aria-pressed="true"] .yith-wcwl-icon-svg,
.gk-product-card__wishlist-wrap .yith-wcwl-wishlistexistsbrowse .yith-wcwl-icon-svg {
	fill: var(--gkpc-brand) !important;
	stroke: var(--gkpc-brand) !important;
}

/* Standalone wishlist button (no YITH plugin) */
.gk-product-card__wishlist-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	background: rgba(255,255,255,0.95);
	color: var(--gkpc-text-dark);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0,0,0,0.12);
	transition: transform 0.2s var(--gkpc-ease-out), color 0.2s ease, background 0.2s ease;
}

.gk-product-card__wishlist-btn:hover {
	color: var(--gkpc-brand);
	transform: scale(1.08);
}

.gk-product-card__wishlist-btn.is-active {
	color: var(--gkpc-brand);
}

.gk-product-card__wishlist-btn.is-active .gk-product-card__wishlist-icon {
	fill: currentColor;
}

/* Hover reveal desktop only */
@media (min-width: 768px) {
	.gk-product-card__wishlist-wrap {
		opacity: 0;
		transition: opacity 0.25s ease;
	}
	.gk-product-card:hover .gk-product-card__wishlist-wrap,
	.gk-product-card .gk-product-card__wishlist-wrap:focus-within,
	.gk-product-card .gk-product-card__wishlist-wrap.is-active {
		opacity: 1;
	}
}

/* ═══════════════════════════════════════════════════════════════
 * SALE BADGE — bottom-left overlay (warning pill)
 *   Used when ≥15% discount (CXL 2022 — Discount badges only meaningful ≥15%)
 * ═══════════════════════════════════════════════════════════════ */
.gk-product-card__sale-badge {
	position: absolute;
	bottom: 14px;
	left: 14px;
	background: var(--gkpc-warning-pill);
	color: var(--gkpc-text-dark);
	padding: 5px 12px;
	border-radius: var(--gkpc-radius-pill);
	font-family: var(--gkpc-font-caps);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	z-index: 2;
	line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════
 * BODY — text + price + stock + CTA
 * ═══════════════════════════════════════════════════════════════ */
.gk-product-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 0;
	background: transparent;
	text-align: left;
	min-height: 0;           /* allow flex to shrink */
	justify-content: flex-start;
}

.gk-product-card__eyebrow {
	font-family: var(--gkpc-font-caps);
	font-size: 11px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: var(--gkpc-ls-caps);
	color: var(--gkpc-text-soft);
	margin: 0 0 6px;
}

.gk-product-card__eyebrow-sep {
	margin: 0 6px;
	color: var(--gkpc-text-faint);
}

.gk-product-card__title {
	font-family: var(--gkpc-font-display);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--gkpc-text-dark);
	margin: 0 0 4px;
	text-align: left;
	letter-spacing: -0.015em;

	/* Polish #153 — clamp 2 lines, equalize title row height */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: calc(1.3em * 2);
}

.gk-product-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.gk-product-card__title a:hover {
	color: var(--gkpc-brand);
}

.gk-product-card__variant {
	font-family: var(--gkpc-font-caps);
	font-size: 14px;
	color: var(--gkpc-text-muted);
	margin: 0 0 16px;
}

.gk-product-card__excerpt {
	font-family: var(--gkpc-font-caps);
	font-size: 14px;
	line-height: 1.55;
	color: var(--gkpc-text-muted);
	margin: 0 0 16px;
}

/* ═══════════════════════════════════════════════════════════════
 * RATING — only ≥5 reviews (Spiegel 2017)
 * ═══════════════════════════════════════════════════════════════ */
.gk-product-card__rating {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 12px;
	font-family: var(--gkpc-font-caps);
	font-size: 12px;
	color: var(--gkpc-text-muted);
}

.gk-product-card__rating-stars {
	position: relative;
	display: inline-block;
	font-size: 14px;
	letter-spacing: 1px;
	line-height: 1;
}

.gk-product-card__rating-stars-empty {
	color: #E5E7EB;
}

.gk-product-card__rating-stars-fill {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	white-space: nowrap;
	color: #F59E0B;
}

.gk-product-card__rating-value {
	font-weight: 700;
	color: var(--gkpc-text);
}

.gk-product-card__rating-count {
	color: var(--gkpc-text-soft);
}

/* Polish #154 — empty rating placeholder (0 opinii) outline stars */
.gk-product-card__rating--empty {
	color: var(--gkpc-text-soft);
}

.gk-product-card__rating-stars--empty {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	line-height: 1;
}

.gk-product-card__star--empty {
	display: block;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

.gk-product-card__rating-count--empty {
	color: #6B7280;
	font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════
 * PRICE — del/ins z brand color, baseline align
 * ═══════════════════════════════════════════════════════════════ */
.gk-product-card__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px;
	margin: 0 0 4px;
	font-family: var(--gkpc-font-caps);
	color: var(--gkpc-text-dark);
	line-height: 1.2;
}

.gk-product-card__price .price,
.gk-product-card__price .woocommerce-Price-amount,
.gk-product-card__price-current {
	font-size: 22px;
	font-weight: 700;
	color: var(--gkpc-text-dark);
	text-decoration: none;
}

.gk-product-card__price del,
.gk-product-card__price-regular {
	font-size: 14px;
	color: var(--gkpc-text-soft);
	font-weight: 400;
	text-decoration: line-through;
	margin-right: 0;
}

.gk-product-card__price del .woocommerce-Price-amount,
.gk-product-card__price-regular .woocommerce-Price-amount {
	font-size: inherit;
	color: inherit;
	font-weight: inherit;
}

.gk-product-card__price ins {
	background: transparent;
	text-decoration: none;
	color: var(--gkpc-brand);
	font-weight: 700;
	font-size: 22px;
}

.gk-product-card__price ins .woocommerce-Price-amount {
	color: var(--gkpc-brand);
}

.gk-product-card--on-sale .gk-product-card__price-current,
.gk-product-card--on-sale .gk-product-card__price ins {
	color: var(--gkpc-brand);
}

.gk-product-card__unit-price {
	font-family: var(--gkpc-font-caps);
	font-size: 11px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: var(--gkpc-ls-caps);
	color: var(--gkpc-text-soft);
}

/* Polish 17 — Omnibus mniejsza czcionka (user mandate 2026-05-28) */
.gk-product-card .gk-product-card__omnibus,
.gk-product-card__omnibus {
	font-family: var(--gkpc-font-caps) !important;
	font-size: 10px !important;
	font-style: italic !important;
	color: var(--gkpc-text-soft) !important;
	margin: 4px 0 0 !important;
	line-height: 1.35 !important;
	letter-spacing: 0 !important;
}

/* Polish 17 — ukryj iworks-omnibus plugin Omnibus na kafelku produktu.
   Plugin renderuje 16px duży tekst który duplikuje mój __omnibus (10px).
   Zachowuję plugin na PDP, ukrywam tylko w product card scope. */
.gk-product-card .iworks-omnibus,
.gk-product-card .gk-product-card__price .iworks-omnibus {
	display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
 * STOCK indicator — dot + label
 * ═══════════════════════════════════════════════════════════════ */
.gk-product-card__stock {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--gkpc-font-caps);
	font-size: 12px;
	font-weight: 500;
	margin: 0 0 16px;
	line-height: 1;
}

.gk-product-card__stock-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--gkpc-brand);
	flex-shrink: 0;
}

.gk-product-card__stock--in {
	color: var(--gkpc-brand);
}

.gk-product-card__stock--low {
	color: var(--gkpc-stock-low);
}

.gk-product-card__stock--low .gk-product-card__stock-dot {
	background: var(--gkpc-stock-low);
	animation: gkpc-pulse 2s ease-in-out infinite;
}

.gk-product-card__stock--out {
	color: var(--gkpc-text-soft);
}

.gk-product-card__stock--out .gk-product-card__stock-dot {
	background: var(--gkpc-text-soft);
}

@keyframes gkpc-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.4; }
}

/* ═══════════════════════════════════════════════════════════════
 * CTA — full-width pill, brand green, instant-add micro-feedback
 * ═══════════════════════════════════════════════════════════════ */
.gk-product-card__cta,
a.gk-product-card__cta,
a.gk-product-card__cta:visited {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 48px;
	padding: 12px 20px;
	/* Polish 15 — forest-dark base (#1F3D14) zamiast brand green (per user mandate) */
	background: var(--gkpc-brand-dark) !important;
	color: #ffffff !important;
	border: 0;
	border-radius: var(--gkpc-radius-pill);
	font-family: var(--gkpc-font-caps);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-decoration: none !important;
	text-transform: none;
	cursor: pointer;
	transition: background 300ms var(--gkpc-ease-out),
				transform 200ms var(--gkpc-ease-out),
				box-shadow 300ms var(--gkpc-ease-out),
				opacity 200ms ease;
	margin-top: auto;
	line-height: 1.2;
	box-shadow: 0 1px 3px rgba(0,0,0,0.08);
	overflow: hidden;
}

.gk-product-card__cta:hover,
a.gk-product-card__cta:hover,
.gk-product-card__cta:focus,
a.gk-product-card__cta:focus,
a.gk-product-card__cta:focus-visible {
	/* Hover/focus → brand green (#5DA935). Override WC default link blue. */
	background: var(--gkpc-brand) !important;
	color: #ffffff !important;
	transform: translateY(-1px);
	box-shadow: 0 12px 32px rgba(31, 61, 20, 0.30);
	text-decoration: none !important;
	outline: none;
}

.gk-product-card__cta:focus-visible,
a.gk-product-card__cta:focus-visible {
	box-shadow: 0 0 0 3px rgba(93, 169, 53, 0.35), 0 12px 32px rgba(31, 61, 20, 0.30);
}

.gk-product-card__cta:active,
a.gk-product-card__cta:active {
	transform: scale(0.98);
	background: var(--gkpc-brand-dark) !important;
}

.gk-product-card__cta-icon {
	flex-shrink: 0;
	flex: 0 0 18px;
}

/* CTA loading + added states (WC AJAX) */
.gk-product-card__cta-spinner,
.gk-product-card__cta-check {
	display: none;
}

.gk-product-card__cta.loading {
	pointer-events: none;
	opacity: 0.7;
	background: var(--gkpc-brand-hover);
}

.gk-product-card__cta.loading .gk-product-card__cta-label {
	opacity: 0.6;
}

.gk-product-card__cta.loading .gk-product-card__cta-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255,255,255,0.3);
	border-top-color: #fff;
	border-radius: 9999px;
	animation: gkpc-spin 0.7s linear infinite;
}

.gk-product-card__cta.added {
	background: var(--gkpc-brand-hover);
}

.gk-product-card__cta.added .gk-product-card__cta-check {
	display: inline-block;
	font-weight: 800;
	font-size: 16px;
	line-height: 1;
}

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

/* Hide native WC view cart link after add (mini-cart auto-opens) */
.gk-product-card .added_to_cart {
	display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
 * OUT OF STOCK STATE (#145)
 *   CTA disabled, opacity, no pointer events, label "Niedostępny"
 *   WCAG AA: gray bg #6B7280 + white text = 4.83:1
 * ═══════════════════════════════════════════════════════════════ */
.gk-product-card--out-of-stock {
	/* card itself stays normal, only CTA + image dimmed via overlay below */
}

.gk-product-card--out-of-stock .gk-product-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.35);
	pointer-events: none;
	z-index: 1;
}

.gk-product-card__cta--disabled,
.gk-product-card__cta[disabled],
.gk-product-card__cta[aria-disabled="true"] {
	background: var(--gkpc-text-soft) !important;
	color: #fff !important;
	cursor: not-allowed !important;
	opacity: 0.85;
	pointer-events: none;
	box-shadow: none !important;
	transform: none !important;
}

.gk-product-card__cta--disabled:hover {
	background: var(--gkpc-text-soft) !important;
	transform: none !important;
	box-shadow: none !important;
}

/* ═══════════════════════════════════════════════════════════════
 * FEATURED VARIANT — col-span-2 horizontal layout (1st + every 6th)
 * Used on listing only. A = image LEFT, B = image RIGHT (alternation).
 * Polish #156 — visual variants A + B (ribbon + accent border + gradient).
 * ═══════════════════════════════════════════════════════════════ */
.gk-product-card--featured {
	background: linear-gradient(135deg, var(--gkpc-cream) 0%, #ffffff 100%);
	border-radius: var(--gkpc-radius-card);
	overflow: hidden;
	border: 1px solid var(--gkpc-border);
	transition: transform 360ms var(--gkpc-ease-out), box-shadow 360ms var(--gkpc-ease-out);
}

/* Featured accent borders — A = left, B = right */
.gk-product-card--featured-a {
	border-left: 4px solid var(--gkpc-emerald);
}
.gk-product-card--featured-b {
	border-right: 4px solid var(--gkpc-emerald);
}

/* Featured hover lift — stronger than regular (-6px vs -4px) */
.gk-product-card--featured:hover {
	transform: translateY(-6px);
	box-shadow: 0 24px 60px -12px rgba(31, 61, 20, 0.25);
}
.gk-product-card--featured:hover .gk-product-card__image--primary,
.gk-product-card--featured:hover .gk-product-card__media img {
	transform: scale(1.05);
}

/* Featured ribbon (top-left corner — corner badge style) */
.gk-product-card__ribbon {
	position: absolute;
	top: 18px;
	left: 18px;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	background: var(--gkpc-emerald);    /* emerald = strong contrast vs forest-dark images */
	color: #ffffff;
	font-family: var(--gkpc-font-caps);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	line-height: 1;
	border-radius: 9999px;
	box-shadow: 0 6px 18px rgba(0, 150, 104, 0.30);
}

/* Featured-b ribbon — sits on the content side (top-LEFT of body which is on the left) */
@media (min-width: 1200px) {
	.gk-product-card--featured-b .gk-product-card__ribbon {
		top: 18px;
		left: 18px;
	}
}

@media (min-width: 1200px) {
	.gk-product-card--featured {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		align-items: stretch;
	}
	.gk-product-card--featured .gk-product-card__media {
		aspect-ratio: auto !important;
		width: 100%;
		height: 100%;
		min-height: 480px;
		margin: 0;
		border-radius: 0;
		border: 0;
	}
	.gk-product-card--featured .gk-product-card__media .gk-product-card__image {
		position: absolute;
		inset: 0;
		width: 100% !important;
		height: 100% !important;
		object-fit: cover;
	}
	.gk-product-card--featured .gk-product-card__body {
		padding: 40px;
		display: flex;
		flex-direction: column;
		justify-content: center;
		min-width: 0;
		gap: 4px;
	}

	/* Variant A — image LEFT, content RIGHT */
	.gk-product-card--featured-a .gk-product-card__media {
		order: 1;
	}
	.gk-product-card--featured-a .gk-product-card__body {
		order: 2;
	}

	/* Variant B — image RIGHT, content LEFT */
	.gk-product-card--featured-b .gk-product-card__media {
		order: 2;
	}
	.gk-product-card--featured-b .gk-product-card__body {
		order: 1;
	}

	/* Title scale for featured */
	.gk-product-card--featured .gk-product-card__title {
		font-size: 30px;
		line-height: 1.15;
		-webkit-line-clamp: 3;
		min-height: auto;
	}
	.gk-product-card--featured .gk-product-card__excerpt {
		font-size: 15px;
		-webkit-line-clamp: 3;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
}

/* Mobile / tablet — stack vertical (image on top) */
@media (max-width: 1199px) {
	.gk-product-card--featured .gk-product-card__body {
		padding: 24px 20px 20px;
	}
}

/* ═══════════════════════════════════════════════════════════════
 * COMPACT VARIANT — related products (PDP) + dense grids
 * ═══════════════════════════════════════════════════════════════ */
.gk-product-card--compact .gk-product-card__title {
	font-size: 17px;
	line-height: 1.25;
}

.gk-product-card--compact .gk-product-card__media {
	margin-bottom: 14px;
}

.gk-product-card--compact .gk-product-card__variant,
.gk-product-card--compact .gk-product-card__excerpt {
	display: none;
}

.gk-product-card--compact .gk-product-card__cta {
	min-height: 42px;
	padding: 10px 16px;
	font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════
 * GRID HELPER (general purpose, opt-in)
 * ═══════════════════════════════════════════════════════════════ */
.gk-product-card-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (min-width: 768px) {
	.gk-product-card-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

@media (min-width: 1024px) {
	.gk-product-card-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}

/* ═══════════════════════════════════════════════════════════════
 * RESPONSIVE — mobile/tablet adjustments
 * ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
	.gk-product-card__title { font-size: 18px; }
	.gk-product-card__cta { font-size: 13px; padding: 10px 14px; min-height: 44px; }
}

@media (max-width: 480px) {
	.gk-product-card__title { font-size: 17px; }
	.gk-product-card__tag { font-size: 9px; padding: 5px 10px; }
}

/* ═══════════════════════════════════════════════════════════════
 * REDUCED MOTION
 * ═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
	.gk-product-card,
	.gk-product-card__image,
	.gk-product-card__cta,
	.gk-product-card__wishlist-wrap,
	.gk-product-card__stock-dot {
		transition: none !important;
		animation: none !important;
	}
	.gk-product-card:hover .gk-product-card__image { transform: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
 * BACKWARDS COMPAT — legacy .gk-card-* selectors map to new BEM
 * (during migration; can be removed once all consumers updated)
 * ═══════════════════════════════════════════════════════════════ */
.gk-card-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (min-width: 768px) {
	.gk-card-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

@media (min-width: 1024px) {
	.gk-card-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}

/* FIX 2026-05-31: 1 kolumna na telefonach (≤600px) — decyzja użytkownika.
   Dotyczy obu współdzielonych gridów (home bestsellery / PDP „Klienci kupili też" / wishlist). */
@media (max-width: 600px) {
	.gk-product-card-grid,
	.gk-card-grid { grid-template-columns: 1fr; gap: 14px; }
}
