.bwpb {
	--bwpb-color: #0B72B9;
	--bwpb-btn-text: #ffffff;
	--bwpb-soft: #E7F1F8;
	--bwpb-card: #ffffff;
	--bwpb-ink: #1f2933;
	--bwpb-line: #e2e8f0;
	--bwpb-save: #1b8a55;
	color: var(--bwpb-ink);
	font-family: inherit;
	line-height: 1.45;
}

.bwpb *, .bwpb *::before, .bwpb *::after { box-sizing: border-box; }

/* Encabezado: regla del pack + selector de cantidad de packs */
.bwpb .bwpb-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	padding: 20px 24px;
	margin-bottom: 24px;
	background: var(--bwpb-soft);
	border-radius: 20px;
}
.bwpb .bwpb-rule { display: grid; gap: 4px; max-width: 520px; }
.bwpb .bwpb-rule strong { font-size: 1.25em; }
.bwpb .bwpb-rule span { font-size: .95em; opacity: .85; }
.bwpb .bwpb-packs { display: flex; align-items: center; gap: 14px; font-weight: 600; }

/* Selectores de cantidad */
.bwpb .bwpb-stepper {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: var(--bwpb-card);
	border: 1px solid var(--bwpb-line);
	border-radius: 999px;
	padding: 4px;
}
.bwpb .bwpb-stepper button {
	width: 36px;
	height: 36px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: var(--bwpb-color);
	color: var(--bwpb-btn-text);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: transform .12s ease, opacity .12s ease;
}
.bwpb .bwpb-stepper button:hover:not(:disabled) { transform: scale(1.08); }
.bwpb .bwpb-stepper button:disabled { opacity: .3; cursor: not-allowed; }
.bwpb .bwpb-stepper output { min-width: 34px; text-align: center; font-weight: 700; font-size: 1.05em; }

/* Grilla de productos */
.bwpb .bwpb-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 18px;
}
.bwpb .bwpb-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 14px 14px 16px;
	text-align: center;
	background: var(--bwpb-card);
	border: 2px solid var(--bwpb-line);
	border-radius: 20px;
	transition: border-color .15s ease, background-color .15s ease;
}
.bwpb .bwpb-card.is-picked { border-color: var(--bwpb-color); background: var(--bwpb-soft); }
.bwpb .bwpb-img { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 14px; background: var(--bwpb-soft); }
.bwpb .bwpb-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bwpb .bwpb-name { margin: 4px 0 0; padding: 0; font-size: 1em; font-weight: 700; line-height: 1.3; }
.bwpb .bwpb-price { font-size: .95em; opacity: .85; }
.bwpb .bwpb-card .bwpb-stepper { margin-top: auto; }

/* Placeholder para evitar saltos de contenido al fijar la barra */
.bwpb .bwpb-bar-placeholder {
	box-sizing: border-box;
	visibility: hidden;
	pointer-events: none;
}

/* Barra superior con progreso y total */
.bwpb .bwpb-bar {
	position: -webkit-sticky;
	position: sticky;
	z-index: 999;
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: center;
	gap: 12px 28px;
	margin-bottom: 24px;
	padding: 16px 22px;
	background: var(--bwpb-card);
	border: 2px solid var(--bwpb-color);
	border-radius: 22px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, .14);
	transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}

.bwpb .bwpb-count { margin: 0 0 8px; }
.bwpb .bwpb-track { height: 10px; background: var(--bwpb-line); border-radius: 999px; overflow: hidden; }
.bwpb .bwpb-fill { display: block; height: 100%; width: 0; background: var(--bwpb-color); border-radius: 999px; transition: width .25s ease; }
.bwpb .bwpb-totals { display: grid; gap: 2px; text-align: right; }
.bwpb .bwpb-regular { font-size: .9em; text-decoration: line-through; opacity: .6; }
.bwpb .bwpb-final { font-size: 1.2em; }
.bwpb .bwpb-save { font-size: .9em; font-weight: 700; color: var(--bwpb-save); }
.bwpb .bwpb-cta {
	padding: 14px 26px;
	margin: 0;
	border: 0;
	border-radius: 999px;
	background: var(--bwpb-color);
	color: var(--bwpb-btn-text);
	font-size: 1em;
	font-weight: 700;
	cursor: pointer;
	transition: transform .12s ease, opacity .12s ease;
}
.bwpb .bwpb-cta:hover:not(:disabled) { transform: translateY(-1px); }
.bwpb .bwpb-cta:disabled { opacity: .4; cursor: not-allowed; }
.bwpb .bwpb-msg { grid-column: 1 / -1; margin: 0; min-height: 0; color: #b42318; font-weight: 600; }
.bwpb .bwpb-msg:empty { display: none; }

.bwpb button:focus-visible { outline: 3px solid #111; outline-offset: 2px; }

/* ESCRITORIO: Barra compacta centrada abajo SIEMPRE (Imagen 2), sin tapar chatbot ni carrito */
@media (min-width: 721px) {
	.bwpb .bwpb-bar-placeholder {
		display: none !important;
	}
	.bwpb .bwpb-bar {
		position: fixed !important;
		top: auto !important;
		bottom: 20px !important;
		left: 50% !important;
		transform: translateX(-50%) !important;
		width: min(calc(100% - 220px), 680px) !important;
		max-width: 680px !important;
		margin: 0 !important;
		padding: 10px 20px !important;
		border-radius: 999px !important;
		z-index: 99990 !important;
		box-shadow: 0 12px 35px rgba(15, 23, 42, .24), 0 2px 8px rgba(0, 0, 0, .06) !important;
		transition: opacity .25s ease, transform .25s ease, box-shadow .25s ease !important;
	}
	.bwpb .bwpb-bar.is-out {
		opacity: 0 !important;
		pointer-events: none !important;
		transform: translateX(-50%) translateY(20px) !important;
	}
	.bwpb .bwpb-bar .bwpb-count {
		margin: 0 0 3px;
		font-size: 0.88em;
		white-space: nowrap;
	}
	.bwpb .bwpb-bar .bwpb-track {
		height: 7px;
	}
	.bwpb .bwpb-bar .bwpb-totals {
		font-size: 0.85em;
		line-height: 1.25;
		white-space: nowrap;
	}
	.bwpb .bwpb-bar .bwpb-final {
		font-size: 1.1em;
	}
	.bwpb .bwpb-bar .bwpb-cta {
		padding: 10px 20px;
		font-size: 0.9em;
		white-space: nowrap;
	}
	.admin-bar .bwpb .bwpb-bar:not(.is-fixed) {
		top: calc(var(--bwpb-bar-top, 95px) + 32px);
	}
}

/* MÓVIL: Se mantiene exactamente fijo arriba bajo la cabecera */
@media (max-width: 720px) {
	.bwpb .bwpb-bar {
		grid-template-columns: 1fr;
		text-align: left;
		top: var(--bwpb-bar-top, 78px);
		padding: 14px 16px;
	}
	.bwpb .bwpb-bar.is-fixed {
		position: fixed !important;
		top: var(--bwpb-bar-top, 78px) !important;
		bottom: auto !important;
		left: 50% !important;
		transform: translateX(-50%) !important;
		width: calc(100% - 16px) !important;
		max-width: 100% !important;
		margin: 0 !important;
		padding: 12px 14px !important;
		border-radius: 18px !important;
		z-index: 99990 !important;
		box-shadow: 0 14px 35px rgba(15, 23, 42, .22) !important;
	}
	.bwpb .bwpb-bar.is-fixed.is-out {
		opacity: 0 !important;
		pointer-events: none !important;
		transform: translateX(-50%) translateY(-16px) !important;
	}
	.bwpb .bwpb-totals { text-align: left; }
	.bwpb .bwpb-cta { width: 100%; }
	.bwpb .bwpb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.admin-bar .bwpb .bwpb-bar:not(.is-fixed) {
		top: calc(var(--bwpb-bar-top, 78px) + 46px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.bwpb * { transition: none !important; }
}
