/* ===== Hubeeen Loja ===== */
:root {
	--hubeeen-primary: #5b21e6;
	--hubeeen-primary-dark: #4c1bc4;
	--hubeeen-ink: #1e1b2e;
	--hubeeen-muted: #8a86a0;
	--hubeeen-line: #efedf5;
	--hubeeen-soft: #f4f1fe;
}

.hubeeen-grid {
	display: grid;
	grid-template-columns: repeat(var(--hubeeen-cols, 3), 1fr);
	gap: 24px;
}
@media (max-width: 768px) {
	.hubeeen-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
	.hubeeen-grid { grid-template-columns: 1fr; }
}

.hubeeen-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	border: 1px solid #ececec;
	border-radius: 12px;
	padding: 16px;
	background: #fff;
	transition: box-shadow .2s ease;
}
.hubeeen-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.hubeeen-card__img img { width: 100%; height: auto; border-radius: 8px; display: block; }
.hubeeen-card__title { font-size: 1rem; margin: 0; line-height: 1.3; }
.hubeeen-card__desc { font-size: .88rem; color: #666; margin: 0; flex: 1; }
.hubeeen-card__price { color: var(--hubeeen-primary); font-weight: 700; }
.hubeeen-card__rec { font-weight: 400; color: #888; font-size: .8rem; }

.hubeeen-thanks { text-align: center; padding: 40px 16px; }
.hubeeen-thanks h2 { margin-bottom: 8px; }

/* ===== Tela de sucesso do checkout (view "done" do modal) ===== */
.hubeeen-success {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 56px 8px 24px;
}
.hubeeen-success__check {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #7500D7;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
}
.hubeeen-success__title {
	margin: 0 0 8px !important;
	font-size: 21px !important;
	font-weight: 500 !important;
	color: #181521;
}
.hubeeen-success__msg {
	margin: 0 0 28px !important;
	max-width: 260px;
	font-family: 'Roboto', sans-serif !important;
	font-size: 14px;
	line-height: 1.6;
	color: #726F7C;
}
.hubeeen-success__spinner {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 2.5px solid #E7E2F0;
	border-top-color: #7500D7;
	margin-bottom: 28px;
	animation: hubeeen-spin .9s linear infinite;
}
.hubeeen-success__spinner[hidden] { display: none; }
.hubeeen-success__actions { width: 100%; }
.hubeeen-success__cta {
	width: 100%;
	padding: 14px;
	border-radius: 999px;
	border: 0;
	background: #7500D7;
	color: #fff !important;
	font-size: 14px;
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	cursor: pointer;
	text-decoration: none !important;
	transition: background .15s ease;
}
.hubeeen-success__cta:hover { background: #6200B8; }
.hubeeen-success__cta svg { flex-shrink: 0; }

/* ===== Botões ===== */
.hubeeen-btn {
	appearance: none;
	border: 0;
	border-radius: 12px;
	padding: 13px 18px;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	background: var(--hubeeen-primary);
	color: #fff;
	text-align: center;
	text-decoration: none;
	transition: background .15s ease, opacity .15s ease;
}
.hubeeen-btn:hover { background: var(--hubeeen-primary-dark); }
.hubeeen-btn:disabled { opacity: .55; cursor: default; }
.hubeeen-btn.is-loading { position: relative; color: transparent; }
.hubeeen-btn.is-loading::after {
	content: ""; position: absolute; inset: 0; margin: auto;
	width: 16px; height: 16px; border-radius: 50%;
	border: 2px solid rgba(255,255,255,.5); border-top-color: #fff;
	animation: hubeeen-spin .7s linear infinite;
}
@keyframes hubeeen-spin { to { transform: rotate(360deg); } }
.hubeeen-btn--ghost { background: transparent; color: var(--hubeeen-primary); border: 1px solid var(--hubeeen-primary); }
.hubeeen-btn--pay {
	width: 100%;
	margin-top: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px 18px;
	box-shadow: 0 8px 20px rgba(91,33,230,.28);
}
.hubeeen-btn--pay svg { flex: 0 0 auto; }

/* ===== Carrinho (shortcode simples, mantido) ===== */
.hubeeen-cart { border: 1px solid #ececec; border-radius: 12px; padding: 16px; background: #fff; }
.hubeeen-cart h3 { margin-top: 0; }
.hubeeen-cart__empty { color: var(--hubeeen-muted); text-align: center; padding: 32px 0; }

/* ===== Itens do carrinho (estrutura rica) ===== */
.hubeeen-cart__items { list-style: none; margin: 0; padding: 0; }
.hubeeen-ci {
	display: grid;
	grid-template-columns: 72px 1fr auto;
	gap: 16px;
	padding: 24px 0;
	border-bottom: 1px solid var(--hubeeen-line);
}
.hubeeen-ci__media {
	width: 72px;
	height: 72px;
	border-radius: 16px;
	background: linear-gradient(135deg, #f4f1fe 0%, #ece5fd 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	box-shadow: inset 0 0 0 1px rgba(91,33,230,.07);
}
.hubeeen-ci__media img { width: 100%; height: 100%; object-fit: cover; }
.hubeeen-ci__mono {
	color: var(--hubeeen-primary);
	font-weight: 700;
	font-size: 1.05rem;
	letter-spacing: .5px;
}
.hubeeen-ci__info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hubeeen-ci__name { font-weight: 700; color: var(--hubeeen-ink); line-height: 1.3; }
.hubeeen-ci__variant { font-size: .85rem; color: var(--hubeeen-muted); }
.hubeeen-ci__desc { font-size: .85rem; color: var(--hubeeen-muted); line-height: 1.45; }
.hubeeen-ci__unit { color: var(--hubeeen-primary); font-weight: 700; }
.hubeeen-ci__note { font-size: .8rem; color: var(--hubeeen-muted); font-weight: 400; }

/* Sinalização de entrega (prazo) — sutil, por item, antes do checkout */
.hubeeen-ci__delivery {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 2px;
	font-size: .78rem;
	color: var(--hubeeen-muted);
	line-height: 1.3;
}
.hubeeen-ci__delivery svg { flex: 0 0 auto; opacity: .8; }

/* Rótulo + stepper de páginas/seções adicionais (só em itens com adicional) */
.hubeeen-ci__extra { margin-top: 8px; }
.hubeeen-ci__extra-label {
	display: block;
	font-size: .82rem;
	font-weight: 600;
	color: var(--hubeeen-ink);
	margin: 10px 0 6px;
}
.hubeeen-ci__stepper--extra { margin-top: 0; }
.hubeeen-ci__right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: space-between;
}
.hubeeen-ci__line-label { font-size: .75rem; color: var(--hubeeen-muted); display: block; text-align: right; }
.hubeeen-ci__line { font-weight: 700; color: var(--hubeeen-primary); white-space: nowrap; font-size: 1.02rem; }

/* Stepper de quantidade */
.hubeeen-ci__stepper {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	margin-top: 4px;
	border: 1px solid var(--hubeeen-line);
	border-radius: 12px;
	padding: 8px 14px;
	width: max-content;
}
.hubeeen-qty {
	width: 22px; height: 22px;
	border: 0; background: none;
	color: var(--hubeeen-primary);
	cursor: pointer; font-size: 18px; line-height: 1;
	display: flex; align-items: center; justify-content: center;
}
.hubeeen-qty:hover { opacity: .7; }
.hubeeen-ci__qtynum { min-width: 28px; text-align: center; font-weight: 600; }
.hubeeen-remove {
	border: 0; background: none; cursor: pointer;
	color: var(--hubeeen-muted); padding: 2px;
	display: flex;
}
.hubeeen-remove:hover { color: #e23; }

/* Bloco de totais */
.hubeeen-totals {
	background: var(--hubeeen-soft);
	border-radius: 14px;
	padding: 18px 20px;
	margin-top: 24px;
}
.hubeeen-totals__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: #5a5670;
}
.hubeeen-totals__row + .hubeeen-totals__row { margin-top: 14px; }
.hubeeen-totals__sep { border: 0; border-top: 1px solid #e4dffa; margin: 14px 0; }
.hubeeen-totals__row--total { color: var(--hubeeen-ink); }
.hubeeen-totals__row--total span { font-weight: 700; }
.hubeeen-totals__row--total strong { color: var(--hubeeen-primary); font-size: 1.5rem; }

/* Selo de pagamento */
.hubeeen-paywith {
	text-align: center;
	color: var(--hubeeen-muted);
	font-size: .9rem;
	margin-top: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}
.hubeeen-paywith .hubeeen-stripe { color: var(--hubeeen-primary); font-weight: 800; letter-spacing: -.5px; }

/* ===== Checkout (página standalone) ===== */
#hubeeen-payment-element { margin: 6px 0; }
.hubeeen-pay-msg { color: #c00; font-size: .9rem; min-height: 1.2em; }

/* ===== Botão flutuante (FAB) ===== */
.hubeeen-fab {
	position: fixed;
	right: 24px;
	bottom: 20px;
	z-index: 99998;
	width: 55px;
	height: 55px;
	border: 0;
	border-radius: 50%;
	background: var(--hubeeen-primary);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 24px rgba(91,33,230,.4);
	transition: transform .15s ease;
}
.hubeeen-fab:hover { transform: scale(1.06); }
.hubeeen-fab__count {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 11px;
	background: #ff4d4f;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ===== Drawer lateral ===== */
body.hubeeen-modal-open { overflow: hidden; }
.hubeeen-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: stretch;
	justify-content: flex-end;
}
.hubeeen-modal[hidden] { display: none; }
.hubeeen-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(20,16,40,.55);
	backdrop-filter: blur(2px);
	animation: hubeeen-fade .25s ease;
}
@keyframes hubeeen-fade { from { opacity: 0; } to { opacity: 1; } }

.hubeeen-modal__box {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 460px;
	height: 100vh;
	overflow-y: auto;
	background: #fff;
	padding: 28px 28px 32px;
	box-shadow: -12px 0 40px rgba(0,0,0,.25);
	animation: hubeeen-slide-in .28s cubic-bezier(.22,.61,.36,1);
	transition: max-width .3s cubic-bezier(.22,.61,.36,1);
}
/* Mais espaço quando está no checkout */
.hubeeen-modal__box--wide { max-width: 640px; }
@keyframes hubeeen-slide-in {
	from { transform: translateX(100%); }
	to   { transform: translateX(0); }
}
@media (max-width: 660px) {
	.hubeeen-modal__box, .hubeeen-modal__box--wide { max-width: 100%; }
}

.hubeeen-modal__close {
	position: absolute;
	top: 24px;
	right: 24px;
	border: 0;
	background: none;
	font-size: 26px;
	line-height: 1;
	color: var(--hubeeen-primary);
	cursor: pointer;
	z-index: 2;
}
.hubeeen-modal__close:hover { opacity: .7; }
.hubeeen-modal__title { margin: 0; font-size: 1.6rem; color: var(--hubeeen-ink); }
.hubeeen-modal__sub { margin: 4px 0 20px; color: var(--hubeeen-muted); font-size: .95rem; }
.hubeeen-modal__view[hidden] { display: none; }
.hubeeen-back {
	border: 0;
	background: none;
	color: var(--hubeeen-primary);
	cursor: pointer;
	font-weight: 700;
	padding: 0 0 16px;
}
#hubeeen-modal-checkout { min-height: 240px; }

/* ===== Blindagem contra estilos de botão do tema =====
   Muitos temas aplicam fundo/borda/sombra em todo <button>.
   Aqui forçamos os controles do carrinho a ficarem "limpos". */
.hubeeen-modal__close,
.hubeeen-cart .hubeeen-qty,
.hubeeen-modal .hubeeen-qty,
.hubeeen-cart .hubeeen-extra,
.hubeeen-modal .hubeeen-extra,
.hubeeen-cart .hubeeen-remove,
.hubeeen-modal .hubeeen-remove {
	background: none !important;
	background-image: none !important;
	border: 0 !important;
	box-shadow: none !important;
	text-shadow: none !important;
	min-width: 0 !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	line-height: 1 !important;
}

/* X de fechar */
.hubeeen-modal__close {
	padding: 0 !important;
	width: 32px !important;
	height: 32px !important;
	color: var(--hubeeen-primary) !important;
	font-size: 26px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
}

/* Setas − + do stepper */
.hubeeen-cart .hubeeen-qty,
.hubeeen-modal .hubeeen-qty,
.hubeeen-cart .hubeeen-extra,
.hubeeen-modal .hubeeen-extra {
	width: 24px !important;
	height: 24px !important;
	padding: 0 !important;
	color: #6b6880 !important;
	font-size: 18px !important;
	font-weight: 600 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	border-radius: 0 !important;
}
.hubeeen-cart .hubeeen-qty:hover,
.hubeeen-modal .hubeeen-qty:hover,
.hubeeen-cart .hubeeen-extra:hover,
.hubeeen-modal .hubeeen-extra:hover { color: var(--hubeeen-primary) !important; }

/* "−" no mínimo (base do pacote ou quantidade 1): não dá pra reduzir mais */
.hubeeen-cart .hubeeen-extra:disabled,
.hubeeen-modal .hubeeen-extra:disabled,
.hubeeen-cart .hubeeen-qty:disabled,
.hubeeen-modal .hubeeen-qty:disabled {
	opacity: .35 !important;
	cursor: default !important;
	color: #6b6880 !important;
}
.hubeeen-ci__qtynum { color: var(--hubeeen-ink); }

/* Lixeira */
.hubeeen-cart .hubeeen-remove,
.hubeeen-modal .hubeeen-remove {
	padding: 2px !important;
	color: var(--hubeeen-muted) !important;
	border-radius: 0 !important;
	display: inline-flex !important;
}
.hubeeen-cart .hubeeen-remove:hover,
.hubeeen-modal .hubeeen-remove:hover { color: #e23 !important; }

/* Container do stepper mantém a borda fininha do mockup */
.hubeeen-ci__stepper {
	background: #fff !important;
	box-shadow: none !important;
}

/* Botão "Finalizar compra": garante retângulo full-width como no mockup */
.hubeeen-modal .hubeeen-btn--pay,
.hubeeen-cart .hubeeen-btn--pay {
	width: 100% !important;
	border-radius: 14px !important;
}

/* Botão "Continuar comprando": full-width, secundário, abaixo do finalizar */
.hubeeen-modal .hubeeen-btn--continue,
.hubeeen-cart .hubeeen-btn--continue {
	width: 100% !important;
	margin-top: 10px !important;
	border-radius: 14px !important;
	background: transparent !important;
	color: var(--hubeeen-primary) !important;
	border: 1px solid #e4dffa !important;
}
.hubeeen-modal .hubeeen-btn--continue:hover,
.hubeeen-cart .hubeeen-btn--continue:hover {
	background: var(--hubeeen-soft) !important;
}

/* =========================================================================
   RESET TOTAL — o carrinho não herda NADA do tema do WordPress.
   Define a própria tipografia, espaçamentos, listas e botões.
   ========================================================================= */
#hubeeen-modal,
#hubeeen-modal *,
#hubeeen-modal *::before,
#hubeeen-modal *::after,
.hubeeen-cart,
.hubeeen-cart *,
#hubeeen-cart-fab,
#hubeeen-cart-fab * {
	box-sizing: border-box !important;
	font-family: 'Rethink Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

/* A vitrine (cards de produto) também usa a fonte do plugin */
.hubeeen-grid,
.hubeeen-grid *,
.hubeeen-thanks,
.hubeeen-thanks * {
	font-family: 'Rethink Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Listas sem marcadores/recuo do tema */
#hubeeen-modal ul,
.hubeeen-cart ul {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
#hubeeen-modal li,
.hubeeen-cart li { margin: 0 !important; list-style: none !important; }

/* Todo botão dentro do carrinho começa "zerado" e só recebe o nosso estilo */
#hubeeen-modal button,
.hubeeen-cart button,
#hubeeen-cart-fab {
	-webkit-appearance: none !important;
	appearance: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	font-family: inherit !important;
	outline: none !important;
}

/* Botão flutuante do carrinho: círculo perfeito e ícone centralizado,
   à prova de estilos herdados do tema (padding/min-width/line-height). */
#hubeeen-cart-fab.hubeeen-fab {
	box-sizing: border-box !important;
	width: 55px !important;
	height: 55px !important;
	min-width: 0 !important;
	max-width: none !important;
	padding: 0 !important;
	margin: 0 !important;
	border-radius: 50% !important;
	line-height: 1 !important;
	flex: 0 0 auto !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}
#hubeeen-cart-fab.hubeeen-fab svg { display: block; flex: 0 0 auto; }

/* Títulos e parágrafos sem margens herdadas estranhas */
#hubeeen-modal h2,
#hubeeen-modal h3 { margin: 0; padding: 0; font-weight: 700; }
#hubeeen-modal p { margin: 0; padding: 0; }
#hubeeen-modal img { max-width: 100%; display: block; }
