/* Nota: não se usa container-type aqui. Dentro de alguns construtores
   de páginas (Elementor) um container de consulta faz o bloco que o
   contém ficar bem mais alto do que o conteúdo — sobrava um espaço
   enorme por baixo no telemóvel. As medidas passam por @media. */
/* Orçamentos — Carrinho do pedido: [carrinho_orcamento] e [carrinho_flutuante] */

.poc {
	--poc-accent: #1F3664;
	--poc-ink: #0f172a;
	--poc-ink-2: #334155;
	--poc-muted: #64748b;
	--poc-faint: #94a3b8;
	--poc-line: #e8ebf0;
	--poc-sunk: #f8fafc;
	--poc-surface: #ffffff;
	--poc-r: 16px;
	--poc-t: .18s cubic-bezier(.2, .8, .2, 1);
	font-family: inherit;
	color: var(--poc-ink);
	-webkit-font-smoothing: antialiased;
}
.poc *, .poc *::before, .poc *::after { box-sizing: border-box; }
/* Toques rápidos e repetidos no + e no - não podem ser lidos como duplo
   toque (que no telemóvel aproxima a página). */
.poc button, .poc a, .poc input, .poc select, .poc textarea, .poc label, .poc-toast button {
	touch-action: manipulation;
}
.poc button { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
/* Margens que os temas dão a form/p dentro do cartão: davam um espaço
   enorme a seguir à secção de iniciar sessão no telemóvel. */
.poc .poc-form { margin: 0; padding: 0; }
.poc .poc-form + .poc-form { margin-top: 14px; }
.poc .poc-resumo, .poc .poc-resumo-card > :last-child { margin-bottom: 0; }
.poc .poc-login-links, .poc .poc-nota-login, .poc .poc-ajuda { margin-bottom: 0; }
.poc .poc-ico { width: 18px; height: 18px; flex: none; }
.poc-sr {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- página ---------- */
.poc--pagina {
	width: 100%;
	max-width: 1350px;
	margin: 0 auto;
	overflow-x: clip; /* nada empurra a página para o lado */
}

.poc-cabecalho {
	display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	margin-bottom: 22px;
}
.poc .poc-titulo { margin: 0 0 6px; font-size: clamp(24px, 3.2vw, 34px); font-weight: 680; letter-spacing: -.02em; line-height: 1.15; color: var(--poc-ink); }
.poc-sub { margin: 0; font-size: 14px; color: var(--poc-muted); }
.poc-selo {
	display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
	border: 1px solid var(--poc-line); border-radius: 999px; background: var(--poc-surface);
	font-size: 12.5px; font-weight: 550; color: var(--poc-ink-2);
}
.poc-selo .poc-ico { width: 16px; height: 16px; color: var(--poc-accent); }

/* Telemóvel primeiro: uma coluna. As duas colunas e o resumo colado só
   entram em ecrãs largos, por media query — assim não há nenhum caso em
   que o telemóvel fique com a coluna de 370px a sobrar ao fundo. */
.poc-grelha { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.poc-grelha > * { min-width: 0; }
.poc--pagina > :last-child, .poc-grelha > :last-child, .poc-itens > :last-child { margin-bottom: 0; }
/* Colunas vazias não deixam espaço atrás de si. */
.poc-grelha > :empty { display: none; }

.poc-itens {
	background: var(--poc-surface); border: 1px solid var(--poc-line); border-radius: 20px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 18px 40px -30px rgba(15, 23, 42, .5);
	overflow: hidden;
}

/* ---------- linhas ---------- */
.poc-lista { list-style: none; margin: 0; padding: 0; }
.poc-linha {
	display: grid; grid-template-columns: 72px minmax(0, 1fr) auto auto;
	align-items: center; gap: 16px;
	padding: 16px 18px; border-bottom: 1px solid var(--poc-line);
	transition: background var(--poc-t), opacity var(--poc-t);
}
.poc-lista .poc-linha:last-child { border-bottom: 0; }
.poc-linha:hover { background: var(--poc-sunk); }
.poc-linha.is-ocupada { opacity: .5; pointer-events: none; }

.poc-thumb {
	width: 72px; height: 72px; display: block; overflow: hidden;
	border: 1px solid var(--poc-line); border-radius: 12px; background: var(--poc-sunk);
}
.poc .poc-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poc-img--vazia { background: linear-gradient(135deg, #eef1f5, #e3e8ee); }

.poc-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.poc .poc-nome {
	font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--poc-ink);
	text-decoration: none; overflow-wrap: anywhere;
}
.poc .poc-nome:hover { color: var(--poc-accent); text-decoration: underline; text-underline-offset: 3px; }
.poc-sku {
	font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
	font-size: 11.5px; color: var(--poc-faint); letter-spacing: .01em;
}
.poc-aviso { font-size: 12px; color: #b45309; }

/* quantidade */
.poc-qtd {
	display: inline-flex; align-items: center; gap: 2px; padding: 3px;
	border: 1px solid var(--poc-line); border-radius: 999px; background: var(--poc-surface);
}
.poc .poc-qtd-btn {
	width: 30px; height: 30px; padding: 0; margin: 0; display: grid; place-items: center;
	border: 0; border-radius: 50%; background: transparent; color: var(--poc-ink-2); cursor: pointer;
	transition: background var(--poc-t), color var(--poc-t);
}
.poc .poc-qtd-btn .poc-ico { width: 15px; height: 15px; }
.poc .poc-qtd-btn:hover { background: var(--poc-sunk); color: var(--poc-accent); }
.poc .poc-qtd-input {
	width: 44px; height: 30px; margin: 0; padding: 0; border: 0; outline: 0; background: transparent;
	font: inherit; font-size: 14px; font-weight: 600; text-align: center; color: var(--poc-ink);
	-moz-appearance: textfield; appearance: textfield;
}
.poc .poc-qtd-input::-webkit-outer-spin-button,
.poc .poc-qtd-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.poc-qtd:focus-within { border-color: var(--poc-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--poc-accent) 12%, transparent); }

.poc .poc-remover {
	width: 34px; height: 34px; padding: 0; margin: 0; display: grid; place-items: center;
	border: 0; border-radius: 10px; background: transparent; color: var(--poc-faint); cursor: pointer;
	transition: background var(--poc-t), color var(--poc-t);
}
.poc .poc-remover:hover { background: #fef2f2; color: #dc2626; }
.poc .poc-remover:focus-visible, .poc .poc-qtd-btn:focus-visible { outline: 2px solid var(--poc-accent); outline-offset: 2px; }

/* ---------- vazio ---------- */
.poc-vazio {
	display: flex; flex-direction: column; align-items: center; gap: 8px;
	padding: 56px 24px; text-align: center;
}
.poc-vazio-ico {
	display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px;
	border-radius: 50%; background: var(--poc-sunk); color: var(--poc-faint);
}
.poc-vazio-ico .poc-ico { width: 24px; height: 24px; }
.poc-vazio strong { font-size: 16px; font-weight: 650; }
.poc-vazio span { font-size: 14px; color: var(--poc-muted); }
.poc-vazio .poc-btn { margin-top: 12px; }

/* ---------- resumo ---------- */
.poc-lado { position: static; }
.poc-resumo-card {
	padding: 22px; background: var(--poc-surface); border: 1px solid var(--poc-line); border-radius: 20px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 18px 40px -30px rgba(15, 23, 42, .5);
}
.poc .poc-resumo-titulo { margin: 0 0 16px; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.poc-resumo-linhas { margin: 0 0 18px; padding: 0 0 16px; border-bottom: 1px solid var(--poc-line); }
.poc-resumo-linhas > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 5px 0; }
.poc-resumo-linhas dt { margin: 0; font-size: 13.5px; color: var(--poc-muted); }
.poc-resumo-linhas dd { margin: 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.poc-resumo-valor dd { color: var(--poc-accent); }

.poc-campo { display: block; margin-bottom: 14px; }
.poc-campo-lbl { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: var(--poc-ink-2); }
.poc-campo-lbl small { font-weight: 400; color: var(--poc-faint); }
.poc .poc-campo textarea {
	width: 100%; margin: 0; padding: 11px 13px; resize: vertical;
	border: 1px solid var(--poc-line); border-radius: 12px; background: var(--poc-sunk);
	font: inherit; font-size: 14px; line-height: 1.5; color: var(--poc-ink);
	transition: border-color var(--poc-t), box-shadow var(--poc-t), background var(--poc-t);
}
.poc .poc-campo textarea::placeholder { color: var(--poc-faint); }
.poc .poc-campo textarea:focus {
	outline: 0; background: var(--poc-surface); border-color: var(--poc-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--poc-accent) 12%, transparent);
}

/* iniciar sessão na própria página */
.poc-login { padding-top: 4px; margin-bottom: 12px; border-top: 1px solid var(--poc-line); }
.poc-login-tit { margin: 14px 0 12px; font-size: 13.5px; font-weight: 650; color: var(--poc-ink); }
.poc .poc-campo--txt input {
	width: 100%; height: 44px; margin: 0; padding: 0 13px;
	border: 1px solid var(--poc-line); border-radius: 12px; background: var(--poc-sunk);
	font: inherit; font-size: 14px; color: var(--poc-ink);
	transition: border-color var(--poc-t), box-shadow var(--poc-t), background var(--poc-t);
}
.poc .poc-campo--txt input:focus {
	outline: 0; background: var(--poc-surface); border-color: var(--poc-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--poc-accent) 12%, transparent);
}
.poc-check { display: flex; align-items: center; gap: 8px; margin: 2px 0 14px; font-size: 13px; color: var(--poc-ink-2); cursor: pointer; }
.poc-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--poc-accent); }
.poc-login-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0; font-size: 12.5px; }
.poc-login-links a { color: var(--poc-muted); text-decoration: underline; text-underline-offset: 3px; }
.poc-login-links a:hover { color: var(--poc-accent); }

/* avisos do WooCommerce dentro da página do pedido */
.poc-avisos { margin-bottom: 18px; }
.poc-avisos .woocommerce-error,
.poc-avisos .woocommerce-message,
.poc-avisos .woocommerce-info {
	margin: 0 0 10px; padding: 13px 16px; list-style: none;
	border: 1px solid var(--poc-line); border-left: 3px solid var(--poc-accent); border-radius: 12px;
	background: var(--poc-surface); font-size: 14px; color: var(--poc-ink);
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.poc-avisos .woocommerce-error { border-left-color: #dc2626; }

/* ---------- botões ---------- */
.poc .poc-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	margin: 0; padding: 0 18px; height: 44px;
	border: 1px solid transparent; border-radius: 12px;
	font: inherit; font-size: 14.5px; font-weight: 600; line-height: 1; text-decoration: none;
	cursor: pointer; white-space: nowrap;
	transition: transform var(--poc-t), box-shadow var(--poc-t), filter var(--poc-t), background var(--poc-t), color var(--poc-t);
}
.poc .poc-btn--cta {
	width: 100%; height: 52px; color: #fff;
	background: linear-gradient(180deg, color-mix(in srgb, var(--poc-accent) 88%, #fff), var(--poc-accent));
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 2px rgba(15, 23, 42, .2),
		0 10px 22px -12px color-mix(in srgb, var(--poc-accent) 85%, transparent);
}
.poc .poc-btn--cta:hover { filter: brightness(1.07); }
.poc .poc-btn--cta:active { transform: translateY(1px); }
.poc .poc-btn--ghost { border-color: var(--poc-line); background: var(--poc-surface); color: var(--poc-ink); }
.poc .poc-btn--ghost:hover { border-color: var(--poc-accent); color: var(--poc-accent); }
.poc .poc-btn:focus-visible { outline: 2px solid var(--poc-accent); outline-offset: 2px; }
.poc .poc-btn .poc-ico { width: 16px; height: 16px; }

.poc-nota-login { margin: 8px 0 0; font-size: 12.5px; color: var(--poc-muted); text-align: center; }
.poc-garantia {
	display: flex; align-items: flex-start; gap: 9px; margin: 16px 0 0; padding-top: 16px;
	border-top: 1px solid var(--poc-line); font-size: 12.5px; line-height: 1.5; color: var(--poc-muted);
}
.poc-garantia .poc-ico { width: 16px; height: 16px; margin-top: 1px; color: var(--poc-accent); }
.poc .poc-continuar {
	display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
	font-size: 13.5px; font-weight: 550; color: var(--poc-ink-2); text-decoration: none;
}
.poc .poc-continuar .poc-ico { width: 15px; height: 15px; }
.poc .poc-continuar:hover { color: var(--poc-accent); }

/* ---------- ícone do cabeçalho ---------- */
.poc--icone { display: inline-flex; }
.poc .poc-abrir {
	position: relative; display: inline-flex; align-items: center; gap: 8px;
	width: 44px; height: 44px; padding: 0; margin: 0; justify-content: center;
	border: 1px solid transparent; border-radius: 12px; background: transparent;
	color: currentColor; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
	transition: background var(--poc-t), border-color var(--poc-t), transform var(--poc-t);
}
.poc .poc-abrir--texto { width: auto; padding: 0 16px 0 14px; }
.poc .poc-abrir:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.poc .poc-abrir:active { transform: scale(.97); }
.poc .poc-abrir:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.poc .poc-abrir .poc-ico { width: 21px; height: 21px; }
.poc-badge {
	position: absolute; top: 3px; right: 2px; min-width: 19px; height: 19px; padding: 0 5px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 999px; background: var(--poc-accent); color: #fff;
	font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1;
	box-shadow: 0 0 0 2px var(--poc-surface);
	animation: poc-pop .22s cubic-bezier(.2, 1.4, .4, 1);
}
.poc-abrir--texto .poc-badge { position: static; box-shadow: none; margin-left: 2px; }
.poc-badge[hidden] { display: none; }
@keyframes poc-pop { from { transform: scale(.4); opacity: 0; } }

/* cor do ícone: branco para cabeçalhos escuros (omissão), escuro, ou herdada */
.poc--branco .poc-abrir { color: #fff; }
.poc--branco .poc-abrir:hover { background: rgba(255, 255, 255, .14); }
.poc--branco .poc-badge { background: #fff; color: var(--poc-accent); box-shadow: 0 0 0 2px rgba(15, 23, 42, .18); }
.poc--escuro .poc-abrir { color: var(--poc-ink); }

/* ---------- gaveta ---------- */
.poc-gaveta { position: fixed; inset: 0; z-index: 99990; }
.poc-gaveta[hidden] { display: none; }
.poc-gaveta-veu {
	position: absolute; inset: 0; background: rgba(15, 23, 42, .5);
	backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
	opacity: 0; transition: opacity .28s ease;
}
.poc-gaveta.is-aberta .poc-gaveta-veu { opacity: 1; }
.poc-gaveta-painel {
	position: absolute; top: 0; right: 0; bottom: 0; width: min(430px, 100%);
	display: flex; flex-direction: column; background: var(--poc-surface);
	box-shadow: -30px 0 70px -30px rgba(15, 23, 42, .55);
	transform: translateX(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}
.poc-gaveta.is-aberta .poc-gaveta-painel { transform: none; }

.poc-gaveta-topo {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 18px 18px 14px; border-bottom: 1px solid var(--poc-line);
}
.poc-gaveta-tit { display: flex; flex-direction: column; gap: 3px; }
.poc-gaveta-tit strong { font-size: 16px; font-weight: 650; }
.poc-gaveta-tit span { font-size: 12.5px; color: var(--poc-muted); }
.poc .poc-gaveta-x {
	width: 36px; height: 36px; flex: none; padding: 0; margin: 0; display: grid; place-items: center;
	border: 0; border-radius: 10px; background: var(--poc-sunk); color: var(--poc-ink-2); cursor: pointer;
	transition: background var(--poc-t), color var(--poc-t);
}
.poc .poc-gaveta-x:hover { background: #eef1f5; color: var(--poc-ink); }

.poc-gaveta-corpo { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.poc-linha--mini { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; padding: 14px 18px; row-gap: 10px; }
.poc-linha--mini .poc-thumb { width: 56px; height: 56px; border-radius: 10px; }
.poc-linha--mini .poc-nome { font-size: 14px; }
.poc-linha--mini .poc-qtd { grid-column: 2; justify-self: start; }
.poc-linha--mini .poc-remover { width: 30px; height: 30px; align-self: start; }
.poc-linha--mini .poc-remover .poc-ico { width: 15px; height: 15px; }

.poc-gaveta-rodape { padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--poc-line); background: var(--poc-surface); }
.poc-gaveta-conta { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.poc-gaveta-conta span { font-size: 14px; font-weight: 650; }
.poc-gaveta-conta small { font-size: 12.5px; color: var(--poc-muted); }
.poc-gaveta-nota { margin: 10px 0 0; font-size: 12px; color: var(--poc-muted); text-align: center; }

/* ---------- aviso de remoção ---------- */
.poc-toast {
	position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); z-index: 99999;
	display: flex; align-items: center; gap: 14px; max-width: min(92vw, 460px);
	padding: 12px 14px 12px 18px; border-radius: 14px;
	background: #0f172a; color: #fff; font-size: 14px; font-family: inherit;
	box-shadow: 0 20px 45px -20px rgba(0, 0, 0, .7);
	opacity: 0; transition: opacity .22s ease, transform .22s ease;
}
.poc-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.poc-toast[hidden] { display: none; }
.poc-toast span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poc-toast button {
	flex: none; margin: 0; padding: 7px 13px; border: 0; border-radius: 9px;
	background: rgba(255, 255, 255, .14); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.poc-toast button:hover { background: rgba(255, 255, 255, .24); }

/* ---------- ecrãs largos ---------- */
/* Duas colunas só quando há mesmo largura para elas. O limite é alto de
   propósito: o conteúdo do tema é quase sempre mais estreito do que o ecrã,
   e uma coluna de 370px ao lado de outra espremida fica pior do que uma só. */
@media (min-width: 1200px) {
	.poc-grelha { grid-template-columns: minmax(420px, 1fr) 370px; }
	.poc-lado { position: sticky; top: 24px; }
}

@media (max-width: 980px) {
	.poc--pagina .poc-resumo-card { padding: 18px; }
	.poc--pagina .poc-grelha { gap: 16px; }
}
@media (max-width: 600px) {
	.poc-linha { grid-template-columns: 56px minmax(0, 1fr) auto; row-gap: 12px; padding: 14px; }
	.poc-linha .poc-thumb { width: 56px; height: 56px; }
	.poc-linha .poc-qtd { grid-column: 2; justify-self: start; }
	.poc-linha .poc-remover { align-self: start; }
	.poc-cabecalho { margin-bottom: 16px; }
}

/* ---------- entrar / criar conta ---------- */
.poc-abas { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 14px 0 14px; padding: 4px; border-radius: 12px; background: var(--poc-sunk); }
.poc .poc-aba {
	margin: 0; padding: 9px 10px; border: 0; border-radius: 9px; background: transparent;
	font: inherit; font-size: 13px; font-weight: 600; color: var(--poc-muted); cursor: pointer;
	transition: background var(--poc-t), color var(--poc-t);
}
.poc .poc-aba.is-on { background: var(--poc-surface); color: var(--poc-ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .1); }
.poc .poc-aba:focus-visible { outline: 2px solid var(--poc-accent); outline-offset: 2px; }

.poc-registo { padding-top: 2px; }
.poc-registo-tit { margin: 0 0 12px; font-size: 13.5px; font-weight: 650; color: var(--poc-ink); }
.poc-dois { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.poc-ajuda { margin: -6px 0 14px; font-size: 12px; color: var(--poc-faint); }
/* Armadilha para robôs: fora do ecrã, nunca focável por quem vê a página. */
.poc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 420px) {
	.poc-dois { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.poc *, .poc *::before, .poc *::after, .poc-toast { animation: none !important; transition: none !important; }
}

/* ---------- telemóvel: escrever não pode aproximar a página ----------
   O iOS aproxima sempre que um campo tem letra com menos de 16px. Isto
   vem no fim e com !important porque as regras dos campos (.poc-campo--txt
   input, textarea) são mais específicas e ganhavam. */
@media (max-width: 860px) {
	.poc input, .poc select, .poc textarea,
	.poc .poc-campo--txt input,
	.poc .poc-campo textarea,
	.poc .poc-qtd input {
		font-size: 16px !important;
	}
	/* A altura acompanha a letra maior, para os campos não ficarem apertados. */
	.poc .poc-campo--txt input { height: 48px; }
}
