/* MA Free Gift – czerń / biel / Khand */

.ma-gift-bar,
.ma-gift-modal {
	--mg-ink: #000;
	--mg-paper: #fff;
	--mg-line: #000;
	--mg-mute: #6b6b6b;
	--mg-soft: #ededed;
	font-family: "Khand", sans-serif;
}

/* ---------- PROGRESS BAR ---------- */

.ma-gift-bar {
	border: 2px solid var(--mg-line);
	background: var(--mg-paper);
	color: var(--mg-ink);
	padding: 16px 18px 14px;
	margin: 0 0 24px;
}

.ma-gift-bar__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 10px;
}

.ma-gift-bar__title {
	font-size: 20px;
	line-height: 1.15;
	font-weight: 500;
	letter-spacing: .01em;
}

.ma-gift-bar__title strong,
.ma-gift-bar__title .amount {
	font-weight: 700;
}

.ma-gift-bar__track {
	position: relative;
	height: 10px;
	background: var(--mg-soft);
	border: 1px solid var(--mg-line);
	overflow: hidden;
}

.ma-gift-bar__fill {
	display: block;
	height: 100%;
	background: var(--mg-ink);
	transition: width .5s cubic-bezier(.22, .61, .36, 1);
}

.ma-gift-bar.is-ready .ma-gift-bar__track,
.ma-gift-bar.is-done .ma-gift-bar__track {
	border-color: var(--mg-ink);
}

.ma-gift-bar__scale {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	color: var(--mg-mute);
	margin-top: 5px;
	letter-spacing: .04em;
}

.ma-gift-bar__action {
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	background: var(--mg-ink);
	color: var(--mg-paper);
	border: 2px solid var(--mg-ink);
	padding: 7px 16px;
	cursor: pointer;
	transition: background .15s, color .15s;
}

.ma-gift-bar__action:hover,
.ma-gift-bar__action:focus-visible {
	background: var(--mg-paper);
	color: var(--mg-ink);
}

.ma-gift-note {
	font-size: 13px;
	line-height: 1.4;
	color: var(--mg-mute);
	margin: 10px 0 0;
	font-family: "Khand", sans-serif;
}

/* ---------- POZYCJA "PREZENT" W KOSZYKU ---------- */

.ma-gift-badge {
	display: inline-block;
	font-family: "Khand", sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	background: #000;
	color: #fff;
	padding: 2px 8px;
	margin-left: 8px;
	vertical-align: middle;
}

.ma-gift-flag {
	display: none;
}

.ma-gift-qty {
	font-family: "Khand", sans-serif;
	font-size: 16px;
	color: #000;
}

.ma-gift-old {
	color: #9a9a9a;
	margin-right: 6px;
}

.ma-gift-new {
	text-decoration: none;
	font-weight: 700;
}

.ma-gift-change {
	font-family: "Khand", sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	background: none;
	border: 1px solid #000;
	color: #000;
	padding: 4px 10px;
	cursor: pointer;
	white-space: nowrap;
}

.ma-gift-change:hover,
.ma-gift-change:focus-visible {
	background: #000;
	color: #fff;
}

/* ---------- SIDE CART (XootiX) ---------- */

.ma-gift-mount--sidecart {
	padding: 12px 15px 0;
}

.ma-gift-mount--sidecart .ma-gift-bar {
	padding: 12px 12px 10px;
	margin-bottom: 12px;
}

.ma-gift-mount--sidecart .ma-gift-bar__title {
	font-size: 17px;
}

.ma-gift-mount--sidecart .ma-gift-note {
	font-size: 12px;
}

/* W side carcie nie pokazujemy przycisku "Wybierz plecak" – wybór idzie z koszyka/zamówienia. */
.ma-gift-mount--sidecart .ma-gift-bar.is-ready .ma-gift-bar__action {
	display: none;
}

.xoo-wsc-product.ma-gift-item .xoo-wsc-qty-box,
.xoo-wsc-product.ma-gift-item .xoo-wsc-smr-del,
.xoo-wsc-product.ma-gift-item .xoo-wsc-pdel,
.xoo-wsc-product.ma-gift-item a.xoo-wsc-pcode {
	display: none !important;
}

.xoo-wsc-product.ma-gift-item {
	border-left: 3px solid #000;
}

/* ---------- POPUP ---------- */

.ma-gift-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.ma-gift-modal.is-open {
	display: flex;
}

.ma-gift-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .82);
}

.ma-gift-modal__box {
	position: relative;
	background: #fff;
	color: #000;
	border: 2px solid #000;
	width: 100%;
	max-width: 880px;
	max-height: 92vh;
	overflow: auto;
	padding: 34px 34px 26px;
}

.ma-gift-modal__close {
	position: absolute;
	top: 8px;
	right: 12px;
	background: none;
	border: 0;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	color: #000;
}

.ma-gift-modal__head {
	text-align: center;
	border-bottom: 2px solid #000;
	padding-bottom: 18px;
	margin-bottom: 24px;
}

.ma-gift-modal__kicker {
	display: inline-block;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	border: 1px solid #000;
	padding: 3px 12px;
	margin-bottom: 12px;
}

.ma-gift-modal__title {
	font-family: "Khand", sans-serif;
	font-size: clamp(30px, 5vw, 46px);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -.01em;
	margin: 0 0 8px;
	color: #000;
}

.ma-gift-modal__sub {
	font-size: 19px;
	line-height: 1.25;
	margin: 0;
	color: #3a3a3a;
}

.ma-gift-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
}

.ma-gift-card {
	border: 1px solid #000;
	padding: 14px 14px 16px;
	text-align: center;
	display: flex;
	flex-direction: column;
}

.ma-gift-card.is-selected {
	outline: 3px solid #000;
}

.ma-gift-card__media {
	margin-bottom: 10px;
}

.ma-gift-card__media img {
	width: 100%;
	height: auto;
	display: block;
}

.ma-gift-card__name {
	font-family: "Khand", sans-serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.1;
	margin: 0 0 4px;
	color: #000;
}

.ma-gift-card__price {
	font-size: 17px;
	margin: 0 0 12px;
}

.ma-gift-card__price del {
	color: #9a9a9a;
	margin-right: 6px;
}

.ma-gift-card__price ins {
	text-decoration: none;
	font-weight: 700;
}

.ma-gift-card__btn {
	margin-top: auto;
	font-family: "Khand", sans-serif;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	background: #000;
	color: #fff;
	border: 2px solid #000;
	padding: 9px 12px;
	cursor: pointer;
	transition: background .15s, color .15s;
}

.ma-gift-card__btn:hover,
.ma-gift-card__btn:focus-visible {
	background: #fff;
	color: #000;
}

.ma-gift-card__btn[disabled] {
	opacity: .5;
	cursor: wait;
}

.ma-gift-note--modal {
	text-align: center;
	margin-top: 20px;
	border-top: 1px solid #ddd;
	padding-top: 14px;
}

.ma-gift-modal.is-locked .ma-gift-modal__close {
	display: none;
}

body.ma-gift-noscroll {
	overflow: hidden;
}

@media (max-width: 700px) {
	.ma-gift-grid {
		grid-template-columns: 1fr;
	}
	.ma-gift-modal__box {
		padding: 26px 18px 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ma-gift-bar__fill {
		transition: none;
	}
}
