/* ============================================================
   WC Free Gift – sekcja koszyka
   ============================================================ */

.wcfg-wrap {
	margin: 0 0 32px;
}

/* ---- Pasek postępu ---- */
.wcfg-progress-bar-wrap {
	background: #f8f9fa;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	padding: 14px 18px;
	margin-bottom: 18px;
}

.wcfg-progress-bar-wrap--done {
	background: #edfbea;
	border-color: #7bc67e;
}

.wcfg-progress-label {
	margin: 0 0 10px;
	font-size: 14px;
	color: #3c434a;
}

.wcfg-bar {
	height: 10px;
	background: #e2e4e7;
	border-radius: 99px;
	overflow: hidden;
}

.wcfg-bar__fill {
	height: 100%;
	background: linear-gradient(90deg, #7f54b3, #9b69cf);
	border-radius: 99px;
	transition: width 0.5s ease;
}

/* ---- Pudełko gratisów ---- */
.wcfg-gift-box {
	border: 2px solid #7f54b3;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.wcfg-gift-box--locked {
	border-color: #c3c4c7;
}

.wcfg-gift-box__header {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 20px;
	background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
	color: #fff;
}

.wcfg-gift-box--locked .wcfg-gift-box__header {
	background: linear-gradient(135deg, #868686 0%, #aaa 100%);
}

.wcfg-gift-box__header h3 {
	margin: 0 0 2px;
	font-size: 17px;
	color: #fff;
}

.wcfg-gift-box__header p {
	margin: 0;
	font-size: 13px;
	opacity: 0.9;
}

.wcfg-gift-icon {
	font-size: 36px;
	line-height: 1;
	flex-shrink: 0;
}

/* ---- Siatka: 5 kolumn ---- */
.wcfg-products {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 16px;
	padding: 20px;
}

/* ---- Karta produktu ---- */
.wcfg-product {
	border: 2px solid #e2e4e7;
	border-radius: 8px;
	overflow: hidden;
	background: #fafafa;
	transition: border-color 0.2s, box-shadow 0.2s;
	display: flex;
	flex-direction: column;
}

.wcfg-product--selected {
	border-color: #7f54b3;
	background: #fff;
	box-shadow: 0 3px 14px rgba(127, 84, 179, 0.25);
}

.wcfg-product:not(.wcfg-product--locked):not(.wcfg-product--selected):hover {
	border-color: #7f54b3;
	background: #fff;
	box-shadow: 0 2px 10px rgba(127, 84, 179, 0.15);
}

/* ---- Wrapper obrazka ---- */
.wcfg-product__img-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f0f0f0;
}

.wcfg-product__img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Szare zdjęcie gdy zablokowane */
.wcfg-product--locked .wcfg-product__img-wrap img {
	filter: grayscale(100%) opacity(0.55);
}

/* ---- Overlay "Brakuje Ci" ---- */
.wcfg-product__lock-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	background: rgba(0, 0, 0, 0.38);
	text-align: center;
	padding: 8px;
}

.wcfg-lock-icon {
	font-size: 22px;
	line-height: 1;
	margin-bottom: 2px;
}

.wcfg-lock-text {
	font-size: 11px;
	line-height: 1.45;
	color: #fff;
	font-weight: 500;
	text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.wcfg-lock-text strong {
	font-size: 13px;
	display: block;
}

.wcfg-product--loading {
	opacity: 0.6;
	pointer-events: none;
}

/* ---- Info pod zdjęciem ---- */
.wcfg-product__info {
	padding: 10px 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}

.wcfg-product__name {
	font-size: 12px;
	font-weight: 600;
	color: #1d2327;
	line-height: 1.4;
}

.wcfg-product--locked .wcfg-product__name {
	color: #888;
}

.wcfg-product__price {
	font-size: 11px;
	display: flex;
	align-items: center;
	gap: 5px;
	flex-wrap: wrap;
}

.wcfg-product__original {
	color: #999;
	text-decoration: line-through;
}

.wcfg-product__free {
	display: inline-block;
	background: #7f54b3;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 1px 6px;
	border-radius: 4px;
	letter-spacing: 0.5px;
}

.wcfg-product--locked .wcfg-product__free {
	background: #aaa;
}

/* ---- Przycisk Wybierz ---- */
.wcfg-btn-select {
	display: block;
	width: 100%;
	margin-top: auto;
	background: #7f54b3 !important;
	color: #fff !important;
	border: none !important;
	border-radius: 6px !important;
	padding: 7px 0 !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	cursor: pointer;
	transition: background 0.2s !important;
	text-align: center;
}

.wcfg-btn-select:hover {
	background: #6a3f9e !important;
}

.wcfg-btn-select:disabled {
	opacity: 0.6;
	cursor: default;
}

/* ---- Odznaka "Wybrany" ---- */
.wcfg-product__badge {
	display: block;
	background: #2e7d32;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 6px 0;
	border-radius: 6px;
	text-align: center;
	margin-top: auto;
}

/* ---- Responsywność ---- */
@media (max-width: 900px) {
	.wcfg-products {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 560px) {
	.wcfg-products {
		grid-template-columns: repeat(2, 1fr);
		padding: 12px;
		gap: 10px;
	}
}

/* ---- Przycisk "Wybrany – kliknij aby zmienić" ---- */
.wcfg-btn-deselect {
	display: block;
	width: 100%;
	margin-top: auto;
	background: #2e7d32 !important;
	color: #fff !important;
	border: none !important;
	border-radius: 6px !important;
	padding: 7px 4px !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	cursor: pointer;
	transition: background 0.2s !important;
	text-align: center;
	line-height: 1.3;
}

.wcfg-btn-deselect:hover {
	background: #b71c1c !important;
}

.wcfg-btn-deselect:disabled {
	opacity: 0.6;
	cursor: default;
}
