/* AVQuote 2.0 — loja. Herda fonte e estilo de botão do tema; a cor da marca vem do painel. */

:root {
	--avquote-cor: #0b4f8a;
	--avquote-cor-texto: #fff;
	--avquote-cor-suave: color-mix(in srgb, var(--avquote-cor) 9%, #fff);
	--avquote-borda: #e3e7ec;
	--avquote-texto: #1f2933;
	--avquote-texto-2: #52606d;
	--avquote-erro: #c62828;
	--avquote-ok: #1e8e3e;
	--avquote-raio: 10px;
	--avquote-sombra: 0 10px 30px rgba(15, 23, 42, .14);
}

/* Ícones desenhados com máscara SVG: seguem a cor do texto do botão. */
.avquote-botao__icone,
.avquote-flutuante__icone,
.avquote-gaveta__icone,
.avquote-vazia__icone,
.avquote-toast__icone,
.avquote-sucesso__icone {
	display: inline-block;
	flex: 0 0 auto;
	width: 1.15em;
	height: 1.15em;
	background: currentColor;
	-webkit-mask: var(--avquote-icone) center / contain no-repeat;
	mask: var(--avquote-icone) center / contain no-repeat;
	--avquote-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 2h6a2 2 0 0 1 2 2h1a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1a2 2 0 0 1 2-2zm0 2v2h6V4H9zm-1 7v2h8v-2H8zm0 4v2h5v-2H8z'/%3E%3C/svg%3E");
}
.avquote-toast__icone,
.avquote-sucesso__icone {
	--avquote-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20zm4.3 6.3L10.5 14l-2.8-2.8-1.4 1.4 4.2 4.2 7.2-7.1-1.4-1.4z'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------ botões de cotação */

.avquote-botao {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: .5em;
	cursor: pointer;
	text-align: center;
	transition: transform .15s ease, opacity .15s ease, background-color .2s ease;
}
.avquote-botao:active { transform: translateY(1px); }
.avquote-botao.is-carregando { opacity: .75; cursor: progress; }
.avquote-botao.is-carregando .avquote-botao__icone {
	--avquote-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a9 9 0 1 0 9 9h-2.5A6.5 6.5 0 1 1 12 5.5V3z'/%3E%3C/svg%3E");
	animation: avquote-gira .8s linear infinite;
}
.avquote-botao.is-adicionado { background-color: var(--avquote-ok) !important; border-color: var(--avquote-ok) !important; color: #fff !important; }
.avquote-botao.is-adicionado .avquote-botao__icone { --avquote-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E"); }

.avquote-acoes { margin: 1em 0; }
.avquote-acoes--single .avquote-linha { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.avquote-acoes--single .avquote-quantidade { margin: 0; }
.avquote-acoes--single .avquote-qtd { width: 5.5em; min-height: 46px; text-align: center; }
.avquote-acoes--single .avquote-botao--single { min-height: 46px; padding-left: 1.6em; padding-right: 1.6em; }
.avquote-modo-ambos { margin-top: .75em; }
.avquote-botao--secundario {
	background: transparent !important;
	color: var(--avquote-cor) !important;
	border: 2px solid var(--avquote-cor) !important;
}
.avquote-botao--secundario:hover { background: var(--avquote-cor-suave) !important; }

.avquote-opcoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 14px; margin-bottom: 14px; }
.avquote-opcao { display: flex; flex-direction: column; gap: 4px; font-size: .9em; font-weight: 600; }
.avquote-opcao select { width: 100%; min-height: 42px; }

.avquote-botao--loop { margin-top: .5em; max-width: 100%; }

.avquote-preco { font-weight: 600; color: var(--avquote-cor); }

/* ------------------------------------------------------------ aviso (toast) */

.avquote-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 2147483001;
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: calc(100vw - 32px);
	padding: 12px 18px;
	border-radius: 999px;
	background: #1f2933;
	color: #fff;
	font-size: 15px;
	line-height: 1.35;
	box-shadow: var(--avquote-sombra);
	opacity: 0;
	transform: translate(-50%, 12px);
	transition: opacity .25s ease, transform .25s ease;
}
.avquote-toast.is-visivel { opacity: 1; transform: translate(-50%, 0); }
.avquote-toast .avquote-toast__icone { color: #6ee7a0; }
.avquote-toast.is-erro { background: var(--avquote-erro); }
.avquote-toast.is-erro .avquote-toast__icone { color: #fff; --avquote-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20zm-1 5v7h2V7h-2zm0 9v2h2v-2h-2z'/%3E%3C/svg%3E"); }
.avquote-toast a { color: #fff; font-weight: 700; text-decoration: underline; white-space: nowrap; }

/* ------------------------------------------------------------ botão flutuante e contador */

.avquote-flutuante {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99990;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px 12px 18px;
	border-radius: 999px;
	background: var(--avquote-cor);
	color: var(--avquote-cor-texto) !important;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none !important;
	box-shadow: var(--avquote-sombra);
	transition: transform .15s ease;
	animation: avquote-entra .35s ease both;
}
.avquote-flutuante[hidden] { display: none; }
.avquote-flutuante--esquerda { right: auto; left: 20px; }
.avquote-flutuante:hover { transform: translateY(-2px); }
.avquote-flutuante:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.avquote-flutuante__n,
.avquote-contador__n,
.avquote-gaveta__n {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.6em;
	height: 1.6em;
	padding: 0 .4em;
	border-radius: 999px;
	background: #fff;
	color: var(--avquote-cor);
	font-size: .82em;
	font-weight: 800;
	line-height: 1;
}
.avquote-contador { display: inline-flex; align-items: center; gap: .4em; text-decoration: none; }
.avquote-contador__n { background: var(--avquote-cor); color: #fff; }
.avquote-contador__n.is-zero { opacity: .55; }

/* ------------------------------------------------------------ carrinho lateral */

/* Acima de chats e widgets flutuantes de outros plugins. */
.avquote-gaveta { position: fixed; inset: 0; z-index: 2147483000; }
.avquote-gaveta *, .avquote-gaveta *::before, .avquote-gaveta *::after { box-sizing: border-box; }
.avquote-gaveta[hidden] { display: none; }
.avquote-gaveta__fundo { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); opacity: 0; transition: opacity .25s ease; }
.avquote-gaveta__painel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(440px, 100vw);
	background: #fff;
	color: var(--avquote-texto);
	box-shadow: -10px 0 40px rgba(15, 23, 42, .2);
	transform: translateX(100%);
	transition: transform .28s cubic-bezier(.2, .8, .2, 1);
	outline: none;
}
.avquote-gaveta.is-aberta .avquote-gaveta__fundo { opacity: 1; }
.avquote-gaveta.is-aberta .avquote-gaveta__painel { transform: translateX(0); }
html.avquote-gaveta-aberta { overflow: hidden; }

.avquote-gaveta__topo {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px;
	border-bottom: 1px solid var(--avquote-borda);
}
.avquote-gaveta__titulo { display: flex; align-items: center; gap: 10px; margin: 0 !important; font-size: 1.15rem !important; line-height: 1.2; }
.avquote-gaveta__icone { color: var(--avquote-cor); width: 1.3em; height: 1.3em; }
.avquote-gaveta__n { background: var(--avquote-cor); color: #fff; }
.avquote-gaveta__fechar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50%;
	background: #f2f4f7 !important;
	color: var(--avquote-texto) !important;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}
.avquote-gaveta__fechar:hover { background: #e5e9ef !important; }
.avquote-gaveta__aviso {
	margin: 14px 20px 0;
	padding: 10px 14px;
	border-radius: 8px;
	background: #e8f5ec;
	color: #14532d;
	font-size: 14px;
	font-weight: 600;
}
.avquote-gaveta__itens { flex: 1 1 auto; overflow-y: auto; padding: 6px 20px; overscroll-behavior: contain; }
.avquote-gaveta__rodape { padding: 16px 20px 20px; border-top: 1px solid var(--avquote-borda); background: #fafbfc; }
.avquote-gaveta__rodape[hidden] { display: none; }
.avquote-gaveta__finalizar { display: flex !important; align-items: center; justify-content: center; width: 100%; min-height: 48px; text-decoration: none !important; }
.avquote-gaveta__continuar {
	display: block;
	width: 100%;
	margin-top: 8px;
	padding: 10px !important;
	border: 0 !important;
	background: transparent !important;
	color: var(--avquote-texto-2) !important;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}
.avquote-gaveta__garantia,
.avquote-garantia { margin: 10px 0 0; font-size: 13px; color: var(--avquote-texto-2); text-align: center; }

/* ------------------------------------------------------------ itens (carrinho lateral e página) */

.avquote-itens { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.avquote-item {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 14px;
	margin: 0 !important;
	padding: 14px 0;
	border-bottom: 1px solid var(--avquote-borda);
	transition: opacity .2s ease;
}
.avquote-item:last-child { border-bottom: 0; }
.avquote-item.is-removendo { opacity: .4; pointer-events: none; }
.avquote-item__img img { display: block; width: 72px; height: 72px; object-fit: contain; border: 1px solid var(--avquote-borda); border-radius: 8px; background: #fff; }
.avquote-item__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.avquote-item__nome { font-weight: 700; color: var(--avquote-texto) !important; text-decoration: none !important; line-height: 1.3; overflow-wrap: anywhere; }
.avquote-item__nome:hover { color: var(--avquote-cor) !important; }
.avquote-item__atrib,
.avquote-item__sku { font-size: 13px; color: var(--avquote-texto-2); }
.avquote-item__remover {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 8px;
	background: transparent !important;
	color: #8a96a3 !important;
	cursor: pointer;
}
.avquote-item__remover:hover { background: #fdecec !important; color: var(--avquote-erro) !important; }

.avquote-itens--compacto .avquote-item { grid-template-columns: 60px minmax(0, 1fr) auto; grid-template-areas: "img info rm" "img qtd qtd"; row-gap: 8px; }
.avquote-itens--compacto .avquote-item__img { grid-area: img; align-self: start; }
.avquote-itens--compacto .avquote-item__img img { width: 60px; height: 60px; }
.avquote-itens--compacto .avquote-item__info { grid-area: info; }
.avquote-itens--compacto .avquote-item__qtd { grid-area: qtd; }
.avquote-itens--compacto .avquote-item__remover { grid-area: rm; align-self: start; }

.avquote-stepper {
	display: inline-flex;
	align-items: stretch;
	height: 40px;
	border: 1px solid #cbd2d9;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}
.avquote-stepper__btn {
	width: 38px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: #f5f7fa !important;
	color: var(--avquote-texto) !important;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}
.avquote-stepper__btn:hover:not(:disabled) { background: var(--avquote-cor-suave) !important; color: var(--avquote-cor) !important; }
.avquote-stepper__btn:disabled { opacity: .35; cursor: default; }
.avquote-stepper__input {
	width: 64px !important;
	min-height: 0 !important;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 4px !important;
	border: 0 !important;
	border-left: 1px solid #e3e7ec !important;
	border-right: 1px solid #e3e7ec !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: #fff !important;
	text-align: center;
	font-weight: 700;
	-moz-appearance: textfield;
}
.avquote-stepper__input::-webkit-outer-spin-button,
.avquote-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ------------------------------------------------------------ estados: vazio, carregando, falha */

.avquote-vazia { padding: 36px 12px; text-align: center; }
.avquote-vazia__icone { width: 54px; height: 54px; color: #b6c0cb; margin-bottom: 8px; }
.avquote-vazia__titulo { margin: 0 0 4px !important; font-size: 1.15em; font-weight: 700; color: var(--avquote-texto); }
.avquote-vazia__texto { margin: 0 0 16px !important; color: var(--avquote-texto-2); }
.avquote-falha { padding: 16px; border-radius: 8px; background: #fdecec; color: var(--avquote-erro); }

.avquote-esqueleto { display: grid; gap: 14px; padding: 14px 0; }
.avquote-esqueleto i {
	display: block;
	height: 72px;
	border-radius: 8px;
	background: linear-gradient(90deg, #eef1f4 0%, #f7f9fb 50%, #eef1f4 100%);
	background-size: 200% 100%;
	animation: avquote-brilho 1.2s ease-in-out infinite;
}

/* ------------------------------------------------------------ página do carrinho de cotação */

.avquote-pagina { color: var(--avquote-texto); }
.avquote-pagina *, .avquote-pagina *::before, .avquote-pagina *::after { box-sizing: border-box; }
.avquote-passos { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 26px !important; padding: 0 !important; list-style: none !important; font-size: 14px; color: var(--avquote-texto-2); }
.avquote-passos li { display: flex; align-items: center; gap: 8px; margin: 0 !important; }
.avquote-passos span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 2px solid #cbd2d9;
	font-weight: 800;
	font-size: 13px;
}
.avquote-passos .is-feito span { background: var(--avquote-ok); border-color: var(--avquote-ok); color: #fff; }
.avquote-passos .is-atual { color: var(--avquote-texto); font-weight: 700; }
.avquote-passos .is-atual span { border-color: var(--avquote-cor); background: var(--avquote-cor); color: #fff; }

.avquote-pagina__grade { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); gap: 32px; align-items: start; }
.avquote-pagina__grade[hidden] { display: none; }
.avquote-pagina.is-vazia .avquote-pagina__grade { grid-template-columns: 1fr; }
.avquote-pagina.is-vazia .avquote-pagina__dados { display: none; }
.avquote-secao { margin: 0 0 6px !important; font-size: 1.2rem !important; }
.avquote-resumo { margin: 0 0 4px !important; font-size: 14px; color: var(--avquote-texto-2); }

.avquote-pagina__dados { position: sticky; top: 24px; }
.avquote-form {
	padding: 24px;
	border: 1px solid var(--avquote-borda);
	border-radius: var(--avquote-raio);
	background: #fff;
	box-shadow: 0 2px 10px rgba(15, 23, 42, .05);
}
.avquote-form__titulo { margin: 0 0 16px !important; font-size: 1.2rem !important; }
.avquote-form__grade { display: grid; grid-template-columns: 1fr; gap: 14px; }
.avquote-campo { display: flex; flex-direction: column; gap: 5px; margin: 0 !important; }
.avquote-campo > label { font-size: 14px; font-weight: 600; }
.avquote-campo abbr.required { color: var(--avquote-erro); text-decoration: none; border: 0; }
.avquote-campo input[type="text"],
.avquote-campo input[type="email"],
.avquote-campo input[type="tel"],
.avquote-campo textarea {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid #cbd2d9;
	border-radius: 8px;
	background: #fff;
	font: inherit;
	color: inherit;
	box-sizing: border-box;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.avquote-campo textarea { min-height: 96px; resize: vertical; }
.avquote-campo input:focus,
.avquote-campo textarea:focus { outline: none; border-color: var(--avquote-cor); box-shadow: 0 0 0 3px color-mix(in srgb, var(--avquote-cor) 22%, transparent); }
.avquote-campo.tem-erro input,
.avquote-campo.tem-erro textarea { border-color: var(--avquote-erro); }
.avquote-erro { font-size: 13px; color: var(--avquote-erro); min-height: 0; }
.avquote-erro:empty { display: none; }
.avquote-lgpd { margin-top: 14px !important; }
.avquote-lgpd label { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 400; line-height: 1.45; }
.avquote-lgpd input { margin-top: 3px; flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--avquote-cor); }
.avquote-form__rodape { margin-top: 18px; }
.avquote-aviso { margin: 0 0 10px !important; color: var(--avquote-erro); font-size: 14px; font-weight: 600; }
.avquote-aviso:empty { display: none; }
.avquote-enviar { width: 100%; min-height: 50px; font-size: 1.05em !important; }
.avquote-enviar.is-carregando { opacity: .75; cursor: progress; }

.avquote-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.avquote-sucesso {
	max-width: 620px;
	margin: 10px auto;
	padding: 40px 28px;
	border: 1px solid var(--avquote-borda);
	border-radius: var(--avquote-raio);
	background: #fff;
	text-align: center;
	box-shadow: 0 2px 10px rgba(15, 23, 42, .05);
	outline: none;
	animation: avquote-entra .35s ease both;
}
.avquote-sucesso__icone { width: 64px; height: 64px; color: var(--avquote-ok); margin-bottom: 10px; }
.avquote-sucesso__titulo { margin: 0 0 8px !important; font-size: 1.6rem !important; color: var(--avquote-cor); }
.avquote-sucesso p { margin: 0 0 20px !important; font-size: 1.05em; line-height: 1.55; }

/* ------------------------------------------------------------ largura real do conteúdo
   O layout responde ao espaço que o tema dá à página (container queries), não só à tela:
   temas com coluna de conteúdo estreita recebem a versão empilhada mesmo no computador. */

.avquote-pagina { container: avquote / inline-size; }
.avquote-pagina__itens { container: avquote-itens / inline-size; min-width: 0; }

@container avquote (max-width: 860px) {
	.avquote-pagina__grade { grid-template-columns: 1fr; gap: 24px; }
	.avquote-pagina__dados { position: static; }
}
@container avquote-itens (max-width: 560px) {
	.avquote-item { grid-template-columns: 60px minmax(0, 1fr) auto; grid-template-areas: "img info rm" "img qtd qtd"; row-gap: 8px; }
	.avquote-item__img { grid-area: img; align-self: start; }
	.avquote-item__img img { width: 60px; height: 60px; }
	.avquote-item__info { grid-area: info; }
	.avquote-item__qtd { grid-area: qtd; }
	.avquote-item__remover { grid-area: rm; align-self: start; }
}

/* ------------------------------------------------------------ celular */

@media (max-width: 900px) {
	.avquote-pagina__grade { grid-template-columns: 1fr; gap: 24px; }
	.avquote-pagina__dados { position: static; }
}
@media (max-width: 600px) {
	.avquote-item { grid-template-columns: 60px minmax(0, 1fr) auto; grid-template-areas: "img info rm" "img qtd qtd"; row-gap: 8px; }
	.avquote-item__img { grid-area: img; align-self: start; }
	.avquote-item__img img { width: 60px; height: 60px; }
	.avquote-item__info { grid-area: info; }
	.avquote-item__qtd { grid-area: qtd; }
	.avquote-item__remover { grid-area: rm; align-self: start; }
	.avquote-form { padding: 18px; }
	.avquote-flutuante { right: 14px; bottom: 14px; padding: 12px 14px; }
	.avquote-flutuante--esquerda { right: auto; left: 14px; }
	.avquote-flutuante__texto { display: none; }
	.avquote-acoes--single .avquote-botao--single { flex: 1 1 auto; }
	.avquote-toast { bottom: 84px; border-radius: 12px; }
}

/* ------------------------------------------------------------ animações */

@keyframes avquote-gira { to { transform: rotate(360deg); } }
@keyframes avquote-brilho { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes avquote-entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	.avquote-gaveta__painel, .avquote-gaveta__fundo, .avquote-toast, .avquote-flutuante, .avquote-sucesso, .avquote-esqueleto i { transition: none !important; animation: none !important; }
}
