/* BK Pack Builder — layout con barra in basso
   Colori modificabili qui: */
.bk-pack,
.bk-pack__dock {
	--bk-ink: #000;
	--bk-paper: #fff;
	--bk-muted: #f2f2f2;
	--bk-accent: #000;
	--bk-ok: #2e7d32;
	--bk-dock-h: 96px;
}

/* ---------- Intestazione ---------- */
.bk-pack__head {
	text-align: center;
	max-width: 720px;
	margin: 0 auto 48px;
}
.bk-pack__heading {
	font-size: clamp(36px, 6vw, 72px);
	line-height: 1;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: -0.01em;
	margin: 0 0 16px;
	padding: 0;
	color: var(--bk-ink);
}
.bk-pack__sub {
	font-size: 17px;
	margin: 0;
	padding: 0;
	opacity: .75;
}

/* ---------- Griglia birre ---------- */
.bk-pack__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px 24px;
}
@media (max-width: 1100px) { .bk-pack__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .bk-pack__grid { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; } }

.bk-pack__item {
	position: relative;
	text-align: center;
	padding: 16px 12px 20px;
	border-radius: 12px;
	background: var(--bk-paper);
	transition: background .2s ease, box-shadow .2s ease;
}
.bk-pack__item.is-selected {
	background: var(--bk-muted);
	box-shadow: inset 0 0 0 2px var(--bk-ink);
}
.bk-pack__item.is-soldout { opacity: .35; pointer-events: none; }

.bk-pack__badge {
	position: absolute;
	top: 10px;
	right: 10px;
	min-width: 32px;
	height: 32px;
	padding: 0 6px;
	border-radius: 16px;
	background: var(--bk-ink);
	color: var(--bk-paper);
	font-weight: 700;
	font-size: 14px;
	line-height: 32px;
	transform: scale(0);
	transition: transform .2s ease;
	z-index: 2;
}
.bk-pack__item.is-selected .bk-pack__badge { transform: scale(1); }

.bk-pack__img img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform .3s ease;
}
.bk-pack__item:hover .bk-pack__img img { transform: translateY(-4px); }

.bk-pack__name {
	font-size: 18px;
	font-weight: 700;
	margin: 12px 0 2px;
	color: var(--bk-ink);
}
.bk-pack__price { font-size: 15px; margin-bottom: 14px; opacity: .75; }

.bk-pack__ctrl {
	display: inline-flex;
	align-items: center;
	border: 2px solid var(--bk-ink);
	border-radius: 999px;
	overflow: hidden;
	background: var(--bk-paper);
}
.bk-pack__ctrl button {
	width: 44px;
	height: 40px;
	border: 0;
	background: transparent;
	color: var(--bk-ink);
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.bk-pack__ctrl button:hover:not(:disabled) { background: var(--bk-ink); color: var(--bk-paper); }
.bk-pack__ctrl button:disabled { opacity: .25; cursor: not-allowed; }
.bk-pack__qty {
	min-width: 36px;
	font-size: 17px;
	font-weight: 700;
	text-align: center;
}

/* ---------- Barra fissa in basso ---------- */
body.bk-pack-active { padding-bottom: 100px; }
@media (max-width: 760px) { body.bk-pack-active { padding-bottom: 130px; } }

.bk-pack__dock {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	background: var(--bk-ink);
	color: var(--bk-paper);
	box-shadow: 0 -6px 24px rgba(0,0,0,.15);
}
.bk-pack__dock-progress {
	height: 4px;
	background: rgba(255,255,255,.15);
}
.bk-pack__dock-progress span {
	display: block;
	height: 100%;
	width: 0;
	background: var(--bk-paper);
	transition: width .3s ease, background .3s ease;
}
.bk-pack__dock.is-complete .bk-pack__dock-progress span { background: #6fdc8c; }

.bk-pack__dock-inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	gap: 24px;
}

.bk-pack__dock-info { flex: 0 0 auto; }
.bk-pack__dock-title {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .1em;
	opacity: .7;
}
.bk-pack__dock-count { font-size: 15px; white-space: nowrap; }
.bk-pack__dock-count strong { font-size: 26px; }
.bk-pack__dock-count span { opacity: .7; font-size: 13px; }

/* 12 slot */
.bk-pack__slots {
	flex: 1 1 auto;
	display: flex;
	gap: 6px;
	justify-content: center;
	min-width: 0;
}
.bk-pack__slot {
	flex: 0 1 44px;
	aspect-ratio: 1;
	max-width: 44px;
	border-radius: 50%;
	border: 2px dashed rgba(255,255,255,.35);
	overflow: hidden;
	background: transparent;
	transition: border-color .2s ease, transform .2s ease;
}
.bk-pack__slot.is-filled {
	border: 2px solid var(--bk-paper);
	background: var(--bk-paper);
	animation: bk-pop .25s ease;
}
.bk-pack__slot img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}
@keyframes bk-pop {
	0% { transform: scale(.6); }
	100% { transform: scale(1); }
}

.bk-pack__dock-actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 14px;
}
.bk-pack__dock-total { text-align: right; line-height: 1.2; }
.bk-pack__dock-total span {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .1em;
	opacity: .7;
}
.bk-pack__dock-total strong { font-size: 20px; white-space: nowrap; }

/* Sconto pack completo */
.bk-pack__total-old {
	display: block;
	font-size: 14px;
	color: rgba(255,255,255,.5);
	text-decoration: line-through;
	white-space: nowrap;
	line-height: 1.1;
}
.bk-pack__total-old[hidden],
.bk-pack__badge-disc[hidden] { display: none !important; }
.bk-pack__badge-disc {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 6px;
	border-radius: 4px;
	background: #6fdc8c;
	color: #000;
	font-style: normal;
	font-weight: 700;
	letter-spacing: 0;
	opacity: 1;
}
.bk-pack__dock.has-discount .bk-pack__dock-total span { opacity: 1; }
.bk-pack__dock.has-discount .js-total { color: #6fdc8c; }

.bk-pack__reset {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,.4);
	background: transparent;
	color: var(--bk-paper);
	font-size: 18px;
	cursor: pointer;
}
.bk-pack__reset:disabled { opacity: .25; cursor: not-allowed; }

.bk-pack__add {
	height: 48px;
	padding: 0 28px;
	border: 0;
	border-radius: 999px;
	background: var(--bk-paper);
	color: var(--bk-ink);
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	white-space: nowrap;
	cursor: pointer;
	transition: transform .15s ease, opacity .15s ease;
}
.bk-pack__add:hover:not(:disabled) { transform: translateY(-1px); }
.bk-pack__add:disabled { opacity: .35; cursor: not-allowed; }
.bk-pack__add.is-loading { opacity: .6; cursor: progress; }

/* Messaggio sopra la barra */
.bk-pack__msg {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 12px);
	transform: translate(-50%, 10px);
	padding: 12px 20px;
	border-radius: 8px;
	background: var(--bk-paper);
	color: var(--bk-ink);
	font-size: 14px;
	box-shadow: 0 6px 20px rgba(0,0,0,.2);
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease, transform .25s ease;
}
.bk-pack__msg.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.bk-pack__msg.is-success { border-left: 4px solid var(--bk-ok); }
.bk-pack__msg.is-error { border-left: 4px solid #c62828; color: #c62828; }
.bk-pack__msg a { font-weight: 700; margin-left: 6px; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
	.bk-pack { --bk-dock-h: 128px; }
	.bk-pack__dock-inner {
		flex-wrap: wrap;
		gap: 10px 12px;
		padding: 10px 14px 12px;
	}
	.bk-pack__dock-info { order: 1; }
	.bk-pack__dock-actions { order: 2; margin-left: auto; gap: 10px; }
	.bk-pack__slots { order: 3; flex-basis: 100%; gap: 4px; }
	.bk-pack__slot { flex: 1 1 0; }
	.bk-pack__dock-title { display: none; }
	.bk-pack__dock-count strong { font-size: 22px; }
	.bk-pack__dock-count span { display: none; }
	.bk-pack__add { height: 42px; padding: 0 16px; font-size: 13px; }
	.bk-pack__reset { width: 36px; height: 36px; }
	.bk-pack__dock-total strong { font-size: 17px; }
	.bk-pack__msg { white-space: normal; width: calc(100% - 28px); }
}
