/**
 * Cesta + conta — botão único do header e painel.
 *
 * Carrega em toda página, porque o header é global. O arquivo é pequeno de
 * propósito: nada de reset, nada de utilitário, só o componente.
 *
 * As fontes não são pedidas aqui. O Elementor já carrega Zilla Slab e Hanken
 * Grotesk no site inteiro (conferido em produção); pedir de novo só somaria
 * requisição ao Google Fonts.
 *
 * @package bpc-loja
 */

.bpc-cc-wrap {
	--bpc-cc-header: #1d4d2e;
	--bpc-cc-pilula: #e9e2d4;
	--bpc-cc-pilula-ativa: #f4efe6;
	--bpc-cc-borda-pilula: rgba(244, 239, 230, .55);

	--bpc-cc-painel: #fff;
	--bpc-cc-borda: #e6dccb;
	--bpc-cc-divisoria: #f0e9dc;
	--bpc-cc-campo: #e0d7c4;
	--bpc-cc-neutro: #f6f1e7;

	--bpc-cc-verde: #2f6b43;
	--bpc-cc-verde-claro: #eaf1e8;
	--bpc-cc-verde-borda: #cdd9cc;

	--bpc-cc-terracota: #e15b43;
	--bpc-cc-terracota-hover: #c2422c;

	--bpc-cc-areia: #f2dfb4;
	--bpc-cc-areia-tinta: #6b4423;
	--bpc-cc-ambar: #9a6622;

	--bpc-cc-tinta: #2a1d12;
	--bpc-cc-menu: #3e3327;
	--bpc-cc-sec: #5a4d3c;
	--bpc-cc-sec2: #6b5d49;
	--bpc-cc-ter: #8a7763;
	--bpc-cc-ter2: #a89b86;
	--bpc-cc-sobre-verde: #c3d6c6;
	--bpc-cc-pessego: #f2c7a0;
	--bpc-cc-rotulo-btn: #4a5a47;

	--bpc-cc-serif: "Zilla Slab", Georgia, serif;
	--bpc-cc-sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

	position: relative;
	display: inline-block;
	font-family: var(--bpc-cc-sans);
}

.bpc-cc {
	position: relative;
}

/* Só para leitor de tela. Definido aqui porque o hello-elementor não garante a classe. */
.bpc-cc-wrap .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ─────────────────────────────────────────────
 *  BOTÃO
 * ───────────────────────────────────────────── */

.bpc-cc__btn {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 8px 14px 8px 12px;
	font: inherit;
	color: var(--bpc-cc-header);
	background: var(--bpc-cc-pilula);
	border: 1.5px solid var(--bpc-cc-borda-pilula);
	border-radius: 11px;
	cursor: pointer;
	transition: background .18s ease, border-color .18s ease;
}

.bpc-cc__btn:hover,
.bpc-cc__btn[aria-expanded="true"] {
	background: var(--bpc-cc-pilula-ativa);
	border-color: var(--bpc-cc-pilula-ativa);
}

/* Foco visível sobre o verde do header. */
.bpc-cc__btn:focus-visible,
.bpc-cc__panel a:focus-visible,
.bpc-cc__panel button:focus-visible {
	outline: 2px solid var(--bpc-cc-pessego);
	outline-offset: 2px;
}

.bpc-cc__icon {
	position: relative;
	display: flex;
	flex: none;
	color: var(--bpc-cc-header);
}

.bpc-cc__count {
	position: absolute;
	top: -6px;
	right: -7px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 19px;
	height: 19px;
	padding: 0 4px;
	font-size: 11.5px;
	font-weight: 800;
	line-height: 1;
	color: #fff;
	background: var(--bpc-cc-terracota);
	border: 2px solid var(--bpc-cc-pilula);
	border-radius: 999px;
}

.bpc-cc__btn:hover .bpc-cc__count,
.bpc-cc__btn[aria-expanded="true"] .bpc-cc__count {
	border-color: var(--bpc-cc-pilula-ativa);
}

.bpc-cc__count--pop {
	animation: bpcPop .28s ease;
}

@keyframes bpcPop {
	0%   { transform: scale(.7); }
	55%  { transform: scale(1.18); }
	100% { transform: scale(1); }
}

.bpc-cc__labels {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1px;
	text-align: left;
}

.bpc-cc__top {
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--bpc-cc-rotulo-btn);
}

.bpc-cc__value {
	font-family: var(--bpc-cc-serif);
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.15;
	color: var(--bpc-cc-header);
}

.bpc-cc__chevron {
	flex: none;
	color: var(--bpc-cc-header);
	transition: transform .18s ease;
}

.bpc-cc__btn[aria-expanded="true"] .bpc-cc__chevron {
	transform: rotate(180deg);
}

/* ─────────────────────────────────────────────
 *  PAINEL
 * ───────────────────────────────────────────── */

.bpc-cc__panel {
	position: absolute;
	top: calc(100% + 12px);
	right: 0;
	z-index: 60;
	width: 382px;
	max-width: calc(100vw - 40px);
	overflow: hidden;
	color: var(--bpc-cc-tinta);
	text-align: left;
	background: var(--bpc-cc-painel);
	border: 1px solid var(--bpc-cc-borda);
	border-radius: 18px;
	box-shadow: 0 40px 70px -30px rgba(29, 77, 46, .45);
}

.bpc-cc__panel[hidden] {
	display: none;
}

.bpc-cc__seta {
	position: absolute;
	top: -7px;
	right: 26px;
	width: 13px;
	height: 13px;
	background: var(--bpc-cc-header);
	border-top: 1px solid var(--bpc-cc-borda);
	border-left: 1px solid var(--bpc-cc-borda);
	border-radius: 2px 0 0 0;
	transform: rotate(45deg);
}

/* Logado: a faixa do topo é clara, então a setinha acompanha. */
.bpc-cc__panel:has(.bpc-cc__id--logado) .bpc-cc__seta {
	background: #fbf8f1;
}

.bpc-cc__secao {
	padding: 14px 16px;
	border-bottom: 1px solid var(--bpc-cc-divisoria);
}

.bpc-cc__secao:last-child {
	border-bottom: 0;
}

/* ── Identidade ───────────────────────────── */

.bpc-cc__id {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 15px 16px;
}

.bpc-cc__id--visitante {
	background: var(--bpc-cc-header);
}

.bpc-cc__id--logado {
	background: #fbf8f1;
	border-bottom: 1px solid var(--bpc-cc-divisoria);
}

.bpc-cc__id-selo {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	color: var(--bpc-cc-pessego);
	background: rgba(255, 255, 255, .14);
	border-radius: 13px;
}

.bpc-cc__avatar {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	overflow: hidden;
	font-family: var(--bpc-cc-serif);
	font-size: 19px;
	font-weight: 700;
	color: var(--bpc-cc-areia-tinta);
	background: var(--bpc-cc-areia);
	border-radius: 13px;
}

.bpc-cc__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bpc-cc__id-texto {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.bpc-cc__id-texto strong {
	overflow: hidden;
	font-family: var(--bpc-cc-serif);
	font-size: 16.5px;
	font-weight: 700;
	line-height: 1.2;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bpc-cc__id-texto span {
	overflow: hidden;
	font-size: 12.5px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bpc-cc__id--visitante .bpc-cc__id-texto strong { color: var(--bpc-cc-pilula-ativa); }
.bpc-cc__id--visitante .bpc-cc__id-texto span   { color: var(--bpc-cc-sobre-verde); }
.bpc-cc__id--logado .bpc-cc__id-texto strong    { color: var(--bpc-cc-tinta); }
.bpc-cc__id--logado .bpc-cc__id-texto span      { color: var(--bpc-cc-ter); }

.bpc-cc__id-link {
	flex: none;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--bpc-cc-verde);
	text-decoration: none;
}

.bpc-cc__id-link:hover {
	text-decoration: underline;
}

/* ── Acesso (visitante) ───────────────────── */

.bpc-cc__botao {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	font-family: var(--bpc-cc-sans);
	font-size: 14.5px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	border: 0;
	border-radius: 11px;
	cursor: pointer;
	transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.bpc-cc__botao--escuro {
	width: 100%;
	color: #fff;
	background: var(--bpc-cc-header);
}

.bpc-cc__botao--escuro:hover {
	color: #fff;
	background: #123a20;
}

.bpc-cc__botao--curto {
	width: auto;
	padding: 10px 22px;
}

.bpc-cc__botao--claro {
	flex: 1;
	color: var(--bpc-cc-verde);
	background: var(--bpc-cc-verde-claro);
	border: 1.5px solid var(--bpc-cc-verde-borda);
}

.bpc-cc__botao--claro:hover {
	color: var(--bpc-cc-verde-claro);
	background: var(--bpc-cc-verde);
	border-color: var(--bpc-cc-verde);
}

.bpc-cc__botao--terracota {
	flex: 1.3;
	color: #fff;
	background: var(--bpc-cc-terracota);
}

.bpc-cc__botao--terracota:hover {
	color: #fff;
	background: var(--bpc-cc-terracota-hover);
}

.bpc-cc__criar {
	margin: 10px 0 0;
	font-size: 13px;
	color: var(--bpc-cc-sec);
	text-align: center;
}

.bpc-cc__criar a {
	font-weight: 700;
	color: var(--bpc-cc-verde);
}

.bpc-cc__nota {
	display: flex;
	gap: 9px;
	align-items: flex-start;
	margin: 12px 0 0;
	padding: 10px 12px;
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--bpc-cc-sec2);
	background: var(--bpc-cc-neutro);
	border-radius: 10px;
}

.bpc-cc__nota .bpc-cc__svg {
	flex: none;
	margin-top: 1px;
	color: var(--bpc-cc-ter);
}

/* ── Atalhos (logado) ─────────────────────── */

.bpc-cc__atalhos {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px;
}

.bpc-cc__atalho {
	display: flex;
	gap: 11px;
	align-items: center;
	padding: 9px 10px;
	font-size: 14px;
	font-weight: 600;
	color: var(--bpc-cc-menu);
	text-decoration: none;
	border-radius: 10px;
	transition: background .15s ease;
}

.bpc-cc__atalho:hover {
	color: var(--bpc-cc-menu);
	background: var(--bpc-cc-neutro);
}

.bpc-cc__atalho .bpc-cc__svg {
	flex: none;
	color: var(--bpc-cc-verde);
}

.bpc-cc__atalho-rotulo {
	flex: 1 1 auto;
}

.bpc-cc__pilula {
	flex: none;
	padding: 3px 9px;
	font-size: 11.5px;
	font-weight: 700;
	color: var(--bpc-cc-areia-tinta);
	background: var(--bpc-cc-areia);
	border-radius: 999px;
}

/* ── Cesta ────────────────────────────────── */

.bpc-cc__cesta-topo {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 11px;
}

.bpc-cc__rotulo {
	font-size: 11.5px;
	font-weight: 700;
	color: var(--bpc-cc-ambar);
	text-transform: uppercase;
	letter-spacing: .14em;
}

.bpc-cc__contagem {
	font-size: 12.5px;
	color: var(--bpc-cc-ter);
}

.bpc-cc__itens {
	display: flex;
	flex-direction: column;
	gap: 13px;
	max-height: 252px;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
	scrollbar-width: thin;
}

.bpc-cc__item {
	display: flex;
	gap: 11px;
	align-items: flex-start;
	transition: background .2s ease, opacity .15s ease;
}

.bpc-cc__item--ocupado {
	opacity: .55;
	pointer-events: none;
}

.bpc-cc__item--novo {
	background: var(--bpc-cc-verde-claro);
	box-shadow: 0 0 0 6px var(--bpc-cc-verde-claro);
	border-radius: 4px;
}

.bpc-cc__item-foto {
	flex: none;
	width: 54px;
	height: 54px;
	overflow: hidden;
	border-radius: 11px;
}

.bpc-cc__item-foto img,
.bpc-cc__item-foto span {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: var(--bpc-cc-neutro);
}

.bpc-cc__item-corpo {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.bpc-cc__item-parceiro {
	font-size: 11px;
	font-weight: 600;
	color: var(--bpc-cc-ambar);
}

.bpc-cc__item-nome {
	font-family: var(--bpc-cc-serif);
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.25;
}

.bpc-cc__item-nome a {
	color: var(--bpc-cc-tinta);
	text-decoration: none;
}

.bpc-cc__item-nome a:hover {
	text-decoration: underline;
}

.bpc-cc__item-detalhes {
	font-size: 12px;
	color: var(--bpc-cc-ter);
}

.bpc-cc__item-acoes {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-top: 4px;
}

.bpc-cc__stepper {
	display: flex;
	align-items: center;
	border: 1.5px solid var(--bpc-cc-campo);
	border-radius: 999px;
}

.bpc-cc__passo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0;
	color: var(--bpc-cc-sec);
	background: none;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
}

.bpc-cc__passo:hover:not(:disabled) {
	background: var(--bpc-cc-neutro);
}

.bpc-cc__passo:disabled {
	opacity: .35;
	cursor: default;
}

.bpc-cc__qtd {
	min-width: 22px;
	font-size: 13px;
	font-weight: 700;
	color: var(--bpc-cc-tinta);
	text-align: center;
}

.bpc-cc__remover {
	padding: 0;
	font-family: inherit;
	font-size: 12px;
	color: var(--bpc-cc-ter2);
	background: none;
	border: 0;
	cursor: pointer;
}

.bpc-cc__remover:hover {
	color: var(--bpc-cc-terracota-hover);
	text-decoration: underline;
}

.bpc-cc__item-total {
	flex: none;
	font-family: var(--bpc-cc-serif);
	font-size: 15px;
	font-weight: 700;
	color: var(--bpc-cc-header);
}

/* ── Frete ────────────────────────────────── */

.bpc-cc__frete {
	margin-top: 13px;
	padding: 11px 13px;
	background: var(--bpc-cc-neutro);
	border-radius: 11px;
}

.bpc-cc__frete-linha {
	display: flex;
	gap: 10px;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 8px;
	font-size: 12.5px;
	color: var(--bpc-cc-sec2);
}

.bpc-cc__frete-linha strong {
	flex: none;
	font-weight: 700;
	color: var(--bpc-cc-header);
}

.bpc-cc__barra {
	height: 5px;
	overflow: hidden;
	background: var(--bpc-cc-borda);
	border-radius: 999px;
}

.bpc-cc__barra span {
	display: block;
	height: 100%;
	background: var(--bpc-cc-verde);
	border-radius: 999px;
	transition: width .25s ease;
}

/* ── Rodapé da cesta ──────────────────────── */

.bpc-cc__subtotal {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-top: 13px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--bpc-cc-divisoria);
	font-size: 13.5px;
	font-weight: 600;
	color: var(--bpc-cc-sec);
}

.bpc-cc__subtotal strong {
	font-family: var(--bpc-cc-serif);
	font-size: 24px;
	font-weight: 700;
	color: var(--bpc-cc-header);
}

.bpc-cc__acoes {
	display: flex;
	gap: 10px;
	margin-top: 12px;
}

/* ── Cesta vazia ──────────────────────────── */

.bpc-cc__vazia {
	display: flex;
	flex-direction: column;
	gap: 7px;
	align-items: center;
	padding: 10px 6px 16px;
	text-align: center;
}

.bpc-cc__vazia-selo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	margin-bottom: 4px;
	color: var(--bpc-cc-ter);
	background: var(--bpc-cc-neutro);
	border-radius: 14px;
}

.bpc-cc__vazia strong {
	font-family: var(--bpc-cc-serif);
	font-size: 17px;
	font-weight: 700;
	color: var(--bpc-cc-tinta);
}

.bpc-cc__vazia p {
	max-width: 34ch;
	margin: 0 0 6px;
	font-size: 13.5px;
	line-height: 1.45;
	color: var(--bpc-cc-sec2);
}

/* ── Faixa de desfazer ────────────────────── */

.bpc-cc__desfazer {
	display: flex;
	gap: 10px;
	align-items: center;
	justify-content: space-between;
	padding: 11px 16px;
	font-size: 13px;
	color: var(--bpc-cc-pilula-ativa);
	background: var(--bpc-cc-header);
}

.bpc-cc__desfazer button {
	padding: 0;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	color: var(--bpc-cc-pessego);
	background: none;
	border: 0;
	cursor: pointer;
	text-decoration: underline;
}

/* ─────────────────────────────────────────────
 *  MOBILE — o painel vira folha de baixo
 * ───────────────────────────────────────────── */

@media (max-width: 719px) {
	.bpc-cc__labels {
		display: none;
	}

	.bpc-cc__btn {
		gap: 7px;
		padding: 9px 11px;
	}

	.bpc-cc__panel {
		position: fixed;
		top: auto;
		right: 0;
		bottom: 0;
		left: 0;
		width: 100%;
		max-width: none;
		max-height: 86vh;
		overflow-y: auto;
		border-radius: 18px 18px 0 0;
		border-bottom: 0;
	}

	.bpc-cc__seta {
		display: none;
	}

	.bpc-cc__itens {
		max-height: none;
	}
}

/* ─────────────────────────────────────────────
 *  MENOS MOVIMENTO
 * ───────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.bpc-cc__btn,
	.bpc-cc__chevron,
	.bpc-cc__barra span,
	.bpc-cc__item,
	.bpc-cc__atalho,
	.bpc-cc__botao {
		transition: none;
	}

	.bpc-cc__count--pop {
		animation: none;
	}
}
