/* Bolacha Brindes — visual da barra de progresso e da escolha de brindes */
.bpb-widget {
	--bpb-color: #2e9e5b;
	--bpb-soft: color-mix(in srgb, var(--bpb-color) 10%, #fff);
	--bpb-line: color-mix(in srgb, var(--bpb-color) 35%, #fff);
	box-sizing: border-box;
	margin: 0 0 24px;
	padding: 14px 16px;
	border: 2px solid #cfe9d9;
	border: 2px solid var(--bpb-line);
	border-radius: 14px;
	background: #f3faf6;
	background: var(--bpb-soft);
	color: #2b2b2b;
	font-size: 16px;
	line-height: 1.45;
	position: relative;
	transition: opacity .15s;
}
.bpb-widget *, .bpb-widget *::before, .bpb-widget *::after { box-sizing: border-box; }
.bpb-widget.is-loading { opacity: .55; pointer-events: none; }
.bpb-widget p { margin: 0; }

.bpb-widget .bpb-test {
	flex: 1 1 100%;
	margin: 0 0 10px;
	padding: 4px 10px;
	border-radius: 6px;
	background: #fff4e5;
	border: 1px dashed #f0b866;
	color: #7a4a00;
	font-size: 13px;
}
.bpb-head { display: flex; gap: 12px; align-items: flex-start; }
.bpb-emoji { font-size: 30px; line-height: 1; flex: none; }
.bpb-title { display: block; font-size: 19px; line-height: 1.25; margin-bottom: 2px; }
.bpb-msg { font-size: 16px; }
.bpb-msg strong, .bpb-msg .amount { color: var(--bpb-color); font-weight: 700; white-space: nowrap; }

/* Barra */
.bpb-progress { padding: 0 16px; margin: 20px 0 8px; }
.bpb-track {
	position: relative;
	height: 14px;
	border-radius: 999px;
	background: #fff;
	box-shadow: inset 0 0 0 1px var(--bpb-line);
}
.bpb-fill {
	height: 100%;
	min-width: 6px;
	border-radius: 999px;
	background: var(--bpb-color);
	transition: width .5s ease;
}
.bpb-step {
	position: absolute;
	top: 50%;
	width: 32px;
	height: 32px;
	margin: -16px 0 0 -16px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--bpb-line);
	font-size: 15px;
	line-height: 1;
}
.bpb-step.is-done { background: var(--bpb-color); border-color: var(--bpb-color); color: #fff; font-weight: 700; }
.bpb-labels { position: relative; height: 24px; margin-top: 14px; font-size: 14px; font-weight: 600; }
.bpb-label { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.bpb-label.is-last { left: auto !important; right: -16px; transform: none; }
.bpb-widget .bpb-label, .bpb-widget .bpb-label .amount, .bpb-widget .bpb-label bdi, .bpb-widget .bpb-label span { color: #2b2b2b; }

.bpb-progress--thin { padding: 0; margin: 8px 0 0; }
.bpb-progress--thin .bpb-track { height: 8px; }

/* Botões */
.bpb-widget .bpb-btn, .bpb-modal .bpb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 8px 16px;
	border: 2px solid var(--bpb-color);
	border-radius: 10px;
	background: var(--bpb-color);
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
}
.bpb-widget .bpb-btn:hover, .bpb-widget .bpb-btn:focus, .bpb-modal .bpb-btn:hover, .bpb-modal .bpb-btn:focus { filter: brightness(.93); color: #fff; }
.bpb-widget .bpb-btn--ghost, .bpb-modal .bpb-btn--ghost { background: #fff; color: var(--bpb-color); }
.bpb-widget .bpb-btn--ghost:hover, .bpb-widget .bpb-btn--ghost:focus, .bpb-modal .bpb-btn--ghost:hover, .bpb-modal .bpb-btn--ghost:focus { color: var(--bpb-color); }
.bpb-widget .bpb-btn:focus-visible, .bpb-widget .bpb-link:focus-visible, .bpb-modal .bpb-btn:focus-visible, .bpb-modal .bpb-link:focus-visible { outline: 3px solid #1a1a1a; outline-offset: 2px; }
.bpb-widget .bpb-link, .bpb-modal .bpb-link {
	min-height: 36px;
	padding: 4px 6px;
	border: 0;
	background: none;
	color: #555;
	font-size: 14px;
	text-decoration: underline;
	cursor: pointer;
	box-shadow: none;
}
.bpb-actions { margin-top: 10px !important; }
.bpb-alert {
	margin-top: 12px !important;
	padding: 10px 12px;
	border-radius: 8px;
	background: #fff4e5;
	border: 1px solid #f0b866;
	color: #7a4a00;
}

/* Lista de brindes */
.bpb-gifts { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--bpb-line); }
.bpb-preview > summary {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	color: var(--bpb-color);
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}
.bpb-preview[open] > summary { margin-bottom: 8px; }
.bpb-gifts-title { font-weight: 700; margin-bottom: 10px !important; }
.bpb-widget ul.bpb-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.bpb-widget li.bpb-gift {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 6px;
	margin: 0;
	padding: 6px;
	border: 2px solid #e6e6e6;
	border-radius: 10px;
	background: #fff;
	text-align: center;
	list-style: none;
}
.bpb-gift-img img { display: block; width: 100%; height: auto; border-radius: 8px; margin: 0; }
.bpb-gift-name { flex: 1; font-size: 13px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.bpb-preview .bpb-gift-name { font-weight: 400; font-size: 12px; }
.bpb-gift.is-locked .bpb-gift-img { opacity: .65; }

.bpb-widget .bpb-preview ul.bpb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Brinde escolhido e botão de escolher */
.bpb-widget ul.bpb-chosen, .bpb-modal ul.bpb-list { list-style: none; margin: 0; padding: 0; }
.bpb-widget li.bpb-row, .bpb-modal li.bpb-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 8px 0;
	list-style: none;
}
.bpb-row-img { flex: none; width: 56px; }
.bpb-row-img img { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: 8px; margin: 0; }
.bpb-row-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.bpb-row-name small { display: block; font-size: 13px; font-weight: 700; color: var(--bpb-color); }
.bpb-widget ul.bpb-chosen li.bpb-row { padding: 4px 0; }
.bpb-widget ul.bpb-chosen .bpb-row-img, .bpb-widget ul.bpb-chosen .bpb-row-img img { width: 44px; height: 44px; }
.bpb-widget .bpb-open { width: 100%; max-width: 360px; margin-top: 4px; min-height: 48px; font-size: 17px; }

/* Janela de escolha */
.bpb-widget .bpb-modal { display: none !important; }
html.bpb-lock, html.bpb-lock body { overflow: hidden !important; }
.bpb-modal {
	--bpb-color: #2e9e5b;
	position: fixed;
	top: 0; right: 0; bottom: 0; left: 0;
	z-index: 2147483000;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: rgba(0, 0, 0, .55);
	color: #2b2b2b;
	font-size: 16px;
	line-height: 1.4;
}
.bpb-modal *, .bpb-modal *::before, .bpb-modal *::after { box-sizing: border-box; }
.bpb-modal p { margin: 0; }
.bpb-modal.is-loading .bpb-list { opacity: .5; pointer-events: none; }
.bpb-modal-box {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 520px;
	max-height: 86vh;
	background: #fff;
	border-radius: 18px 18px 0 0;
	box-shadow: 0 -4px 30px rgba(0, 0, 0, .25);
	overflow: hidden;
}
.bpb-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid #eee;
}
.bpb-modal-head strong { display: block; font-size: 18px; line-height: 1.25; }
.bpb-modal-head span { font-size: 14px; color: #555; }
.bpb-modal .bpb-modal-close {
	flex: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f1f1f1;
	color: #333;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
}
.bpb-modal .bpb-alert { margin: 10px 16px 0 !important; }
.bpb-modal ul.bpb-list {
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding: 4px 16px calc(16px + env(safe-area-inset-bottom, 0px));
}
.bpb-modal li.bpb-row { border-bottom: 1px solid #f0f0f0; }
.bpb-modal li.bpb-row:last-child { border-bottom: 0; }
.bpb-modal li.bpb-row .bpb-btn { flex: none; white-space: nowrap; min-height: 44px; padding: 8px 14px; font-size: 15px; }

@media (min-width: 600px) {
	.bpb-modal { align-items: center; }
	.bpb-modal-box { border-radius: 18px; max-height: 80vh; }
}

/* Barra fina (loja e produto) */
.bpb-compact { display: flex; align-items: center; gap: 12px; padding: 12px 14px; flex-wrap: wrap; }
.bpb-compact .bpb-emoji { font-size: 26px; }
.bpb-compact-body { flex: 1 1 200px; min-width: 0; }

.bpb-free { font-weight: 700; color: #2e9e5b; }

@media (min-width: 600px) {
	.bpb-widget ul.bpb-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
	.bpb-widget .bpb-preview ul.bpb-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
	.bpb-fill, .bpb-widget { transition: none; }
}

/* Celular: botões ocupam a largura toda do quadro, alinhados com a barra */
@media (max-width: 599px) {
	.bpb-widget .bpb-actions .bpb-btn,
	.bpb-widget .bpb-open { display: flex; width: 100%; max-width: none; }
}

/* Escrita normal em todos os botões, sem depender do tema */
.bpb-widget .bpb-btn, .bpb-widget .bpb-link, .bpb-widget summary,
.bpb-modal .bpb-btn, .bpb-modal .bpb-link, .bpb-modal .bpb-modal-close {
	text-transform: none !important;
	letter-spacing: normal !important;
}

/* Próxima etapa em destaque */
.bpb-widget .bpb-label.is-next, .bpb-widget .bpb-label.is-next .amount,
.bpb-widget .bpb-label.is-next bdi, .bpb-widget .bpb-label.is-next span { color: var(--bpb-color); font-weight: 700; }

/* Muitas etapas em pouco espaço: mostra só o valor da próxima etapa e diminui os marcadores */
.bpb-progress { container-type: inline-size; }
@media (max-width: 599px) {
	.bpb-many .bpb-label:not(.is-next) { display: none; }
	.bpb-many .bpb-step { width: 26px; height: 26px; margin: -13px 0 0 -13px; font-size: 12px; }
}
@container (max-width: 520px) {
	.bpb-many .bpb-label:not(.is-next) { display: none; }
	.bpb-many .bpb-step { width: 26px; height: 26px; margin: -13px 0 0 -13px; font-size: 12px; }
}

/* Dentro de linhas flexíveis do tema (barra de ordenação da loja), ocupa a linha inteira */
.bpb-widget { width: 100%; max-width: 100%; flex: 0 0 100%; }

/* Faixa no topo de todas as páginas */
.bpb-widget.bpb-strip {
	margin: 0;
	padding: 8px 16px;
	border: 0;
	border-bottom: 1px solid var(--bpb-line);
	border-radius: 0;
	justify-content: center;
}
.bpb-strip .bpb-compact-body { flex: 1 1 200px; max-width: 620px; }
.bpb-strip .bpb-emoji { font-size: 22px; }
.bpb-strip .bpb-msg { font-size: 15px; }
.bpb-widget.bpb-strip .bpb-btn { min-height: 38px; padding: 6px 12px; font-size: 14px; }
.bpb-widget.bpb-strip .bpb-test { margin-bottom: 4px; text-align: center; }

/* Aviso em todas as páginas, abaixo do menu: mesma largura do conteúdo do site */
.bpb-sitewide {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--wd-container-w, 1222px);
	margin: 16px auto 0;
	padding: 0 15px;
}
.bpb-sitewide .bpb-widget { margin-bottom: 8px; }

/* Quadro completo fora do carrinho: versão mais baixa */
.bpb-widget.bpb-slim { padding: 10px 14px; }
.bpb-slim .bpb-head { align-items: center; gap: 10px; }
.bpb-slim .bpb-emoji { font-size: 22px; }
.bpb-slim .bpb-msg { font-size: 16px; font-weight: 600; }
.bpb-slim .bpb-test { margin-bottom: 6px; padding: 2px 10px; font-size: 12px; }
.bpb-slim .bpb-progress { margin: 14px 0 2px; padding: 0 13px; }
.bpb-slim .bpb-track { height: 10px; }
.bpb-slim .bpb-step { width: 26px; height: 26px; margin: -13px 0 0 -13px; font-size: 12px; }
.bpb-slim .bpb-labels { height: 20px; margin-top: 11px; font-size: 13px; }
.bpb-slim .bpb-label.is-last { right: -13px; }
.bpb-slim .bpb-gifts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 20px;
	margin-top: 6px;
	padding-top: 6px;
}
.bpb-slim details.bpb-gifts { display: block; }
.bpb-widget.bpb-slim ul.bpb-chosen { display: flex; flex-wrap: wrap; gap: 2px 20px; }
.bpb-widget.bpb-slim ul.bpb-chosen li.bpb-row { padding: 0; gap: 8px; }
.bpb-widget.bpb-slim ul.bpb-chosen .bpb-row-img, .bpb-widget.bpb-slim ul.bpb-chosen .bpb-row-img img { width: 32px; height: 32px; border-radius: 6px; }
.bpb-slim .bpb-row-name { flex: 0 1 auto; font-size: 14px; }
.bpb-slim .bpb-row-name small { display: inline; margin-right: 6px; }
.bpb-widget.bpb-slim .bpb-link { min-height: 32px; }
.bpb-widget.bpb-slim .bpb-open { width: auto; max-width: none; margin-top: 0; min-height: 40px; padding: 6px 14px; font-size: 15px; }
.bpb-slim .bpb-preview > summary { min-height: 32px; font-size: 14px; }
@media (max-width: 599px) {
	.bpb-widget.bpb-slim .bpb-open { width: 100%; }
}

/* "Seu brinde" numa linha só também no carrinho e na finalização */
.bpb-widget.bpb-full .bpb-gifts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; }
.bpb-widget.bpb-full details.bpb-gifts { display: block; }
.bpb-widget.bpb-full ul.bpb-chosen { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.bpb-widget.bpb-full ul.bpb-chosen li.bpb-row { padding: 0; gap: 8px; }
.bpb-widget.bpb-full ul.bpb-chosen .bpb-row-img,
.bpb-widget.bpb-full ul.bpb-chosen .bpb-row-img img { width: 32px; height: 32px; border-radius: 6px; }
.bpb-widget.bpb-full ul.bpb-chosen .bpb-row-name { flex: 0 1 auto; font-size: 14px; }
.bpb-widget.bpb-full ul.bpb-chosen .bpb-row-name small { display: inline; margin-right: 6px; }
.bpb-widget.bpb-full ul.bpb-chosen .bpb-link { min-height: 32px; }
@media (min-width: 600px) {
	.bpb-widget.bpb-full .bpb-open { width: auto; max-width: none; margin-top: 0; }
}

/* Rodapé da janela (lembrete na finalização) */
.bpb-modal-foot { padding: 8px 16px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #eee; text-align: center; }
.bpb-modal .bpb-modal-foot .bpb-link { min-height: 44px; font-size: 15px; }
