/* Tito Catálogo — vitrine, produto, tabela de modelos e carrinho de orçamento */
:root {
	--tito-navy: #202b66;
	--tito-navy-dk: #151f57;
	--tito-blue: #2a4bff;
	--tito-line: #e3e5ee;
	--tito-zebra: #f5f6fa;
	--tito-bg: #ffffff;
	--tito-text: #1d1f2a;
	--tito-muted: #5d6275;
	--tito-whats: #1fa855;
	--tito-whats-dk: #178a45;
	--tito-font: "Barlow Condensed", "Barlow", system-ui, sans-serif;
}

html .tito-ico { width: 1.15em; height: 1.15em; flex: none; }
html .tito-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.tito-travado { overflow: hidden; }

/* ---------- layout das páginas do plugin ---------- */
html .tito-pagina {
	max-width: 1240px;
	margin: 0 auto;
	padding: 32px 16px 64px;
	color: var(--tito-text);
	font-size: 17px;
}
html .tito-pagina h1,
html .tito-pagina h2,
html .tito-pagina h3 { font-family: var(--tito-font); color: var(--tito-navy); line-height: 1.1; }
html .tito-pagina h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 700; margin: 0 0 12px; }
html .tito-eyebrow { font-family: var(--tito-font); text-transform: uppercase; letter-spacing: .12em; font-size: 14px; color: var(--tito-blue); margin: 0 0 6px; font-weight: 600; }
html .tito-lead { font-size: 19px; color: var(--tito-muted); max-width: 60ch; margin: 0 0 20px; }

/* ---------- botões ---------- */
html .tito-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 10px 20px;
	border: 2px solid var(--tito-navy);
	border-radius: 0;
	background: var(--tito-navy);
	color: #fff;
	font-family: var(--tito-font);
	font-weight: 700;
	font-size: 17px;
	line-height: 1.1;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: .02em;
	cursor: pointer;
	transition: background .15s, border-color .15s, color .15s;
}
html .tito-btn:hover { background: var(--tito-navy-dk); border-color: var(--tito-navy-dk); color: #fff; }
html .tito-btn:focus-visible,
html .tito-pagina a:focus-visible,
html .tito-gaveta button:focus-visible { outline: 3px solid var(--tito-blue); outline-offset: 2px; }
html .tito-btn[disabled] { opacity: .45; cursor: not-allowed; }
html .tito-btn--sec { background: transparent; color: var(--tito-navy); }
html .tito-btn--sec:hover { background: var(--tito-navy); color: #fff; }
html .tito-btn--whats { background: var(--tito-whats); border-color: var(--tito-whats); }
html .tito-btn--whats:hover { background: var(--tito-whats-dk); border-color: var(--tito-whats-dk); }
html .tito-btn--sm { min-height: 36px; padding: 5px 12px; font-size: 15px; }
html .tito-btn--block { width: 100%; }

/* botão Adicionar <-> Adicionado */
html .tito-btn--add .tito-add__off,
html .tito-btn--add .tito-add__on { display: inline-flex; align-items: center; gap: 6px; }
html .tito-btn--add .tito-add__on { display: none; }
html .tito-btn--add.is-on { background: var(--tito-whats); border-color: var(--tito-whats); color: #fff; }
html .tito-btn--add.is-on .tito-add__off { display: none; }
html .tito-btn--add.is-on .tito-add__on { display: inline-flex; }

html .tito-link { background: none; border: 0; padding: 6px; color: var(--tito-muted); text-decoration: underline; cursor: pointer; font-size: 15px; }

/* ---------- busca e categorias ---------- */
html .tito-busca { display: flex; gap: 0; max-width: 640px; margin: 8px 0 18px; }
html .tito-busca input[type="search"].tito-x, html .tito-busca input[type="search"] {
	flex: 1;
	min-width: 0;
	min-height: 48px;
	padding: 10px 14px;
	border: 2px solid var(--tito-navy);
	border-right: 0;
	border-radius: 0;
	font-size: 17px;
	background: #fff;
}
html .tito-busca input:focus { outline: none; border-color: var(--tito-blue); }
html .tito-busca .tito-btn { min-height: 48px; }

html .tito-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
html .tito-cats a {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	padding: 6px 14px;
	border: 1px solid var(--tito-line);
	background: var(--tito-zebra);
	color: var(--tito-navy);
	font-family: var(--tito-font);
	font-weight: 600;
	font-size: 17px;
	text-decoration: none;
}
html .tito-cats a span { color: var(--tito-muted); font-weight: 400; font-size: 14px; }
html .tito-cats a:hover { border-color: var(--tito-navy); }
html .tito-cats a[aria-current="page"] { background: var(--tito-navy); border-color: var(--tito-navy); color: #fff; }
html .tito-cats a[aria-current="page"] span { color: #c9d0ff; }

/* ---------- vitrine ---------- */
html .tito-arquivo__topo { padding-bottom: 20px; border-bottom: 1px solid var(--tito-line); margin-bottom: 20px; }
html .tito-contagem { color: var(--tito-muted); font-size: 15px; margin: 0 0 14px; }
html .tito-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
html .tito-card { display: flex; flex-direction: column; border: 1px solid var(--tito-line); background: #fff; transition: border-color .15s, box-shadow .15s; }
html .tito-card:hover { border-color: var(--tito-navy); box-shadow: 0 8px 24px rgba(32, 43, 102, .08); }
html .tito-card__img { display: block; aspect-ratio: 4 / 3; background: var(--tito-zebra); overflow: hidden; }
html .tito-card__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
html .tito-card__sem-foto,
html .tito-produto__foto .tito-card__sem-foto {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 16px;
	text-align: center;
	font-family: var(--tito-font);
	font-weight: 700;
	font-size: 22px;
	color: #b6bbd0;
	background: repeating-linear-gradient(135deg, var(--tito-zebra) 0 12px, #eef0f6 12px 24px);
}
html .tito-card__body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; }
html .tito-card__titulo { font-size: 21px; margin: 0 0 4px; }
html .tito-card__titulo a { color: var(--tito-navy); text-decoration: none; }
html .tito-card__titulo a:hover { color: var(--tito-blue); }
html .tito-card__meta { color: var(--tito-muted); font-size: 15px; margin: 0 0 14px; }
html .tito-card .tito-btn { margin-top: auto; }

html .tito-paginacao,
html .tito-pagina .navigation.pagination { margin-top: 32px; }
html .tito-pagina .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
html .tito-pagina .nav-links .page-numbers { padding: 8px 14px; border: 1px solid var(--tito-line); color: var(--tito-navy); text-decoration: none; font-family: var(--tito-font); font-weight: 600; }
html .tito-pagina .nav-links .current { background: var(--tito-navy); color: #fff; border-color: var(--tito-navy); }
html .tito-nada { padding: 32px; border: 1px dashed #c9ccd8; text-align: center; }

/* ---------- produto ---------- */
html .tito-trilha { font-size: 15px; color: var(--tito-muted); margin-bottom: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
html .tito-trilha a { color: var(--tito-navy); }
html .tito-produto__topo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: start; }
html .tito-produto__foto { aspect-ratio: 1; background: var(--tito-zebra); border: 1px solid var(--tito-line); }
html .tito-produto__foto img { width: 100%; height: 100%; object-fit: contain; display: block; }
html .tito-chips { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
html .tito-chips li { background: var(--tito-zebra); border: 1px solid var(--tito-line); padding: 6px 12px; font-size: 16px; color: var(--tito-muted); }
html .tito-chips strong { color: var(--tito-navy); }
html .tito-destaque { border-left: 4px solid var(--tito-blue); background: #eef1ff; padding: 10px 14px; margin: 0 0 18px; }
html .tito-acoes { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
html .tito-aviso { font-size: 15px; color: var(--tito-muted); margin: 0; }

html .tito-produto__detalhes { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px; margin-top: 8px; }
html .tito-desc h2,
html .tito-specs h2 { font-size: 26px; margin: 0 0 12px; }
html .tito-specs dl { display: grid; grid-template-columns: max-content 1fr; margin: 0; border-top: 1px solid var(--tito-line); }
html .tito-specs dt,
html .tito-specs dd { margin: 0; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--tito-line); }
html .tito-specs dt { color: var(--tito-muted); font-size: 15px; }
html .tito-specs dd { font-weight: 600; }

/* ---------- tabela de modelos ---------- */
html .tito-modelos { clear: both; margin: 40px 0; scroll-margin-top: 90px; }
html .tito-modelos__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
html .tito-modelos__head h2 { margin: 0; font-size: 30px; }
html .tito-badge { display: inline-block; min-width: 1.6em; margin-left: 6px; padding: 2px 8px; background: var(--tito-navy); color: #fff; font-size: 17px; vertical-align: middle; text-align: center; }
html .tito-modelos__dica { color: var(--tito-muted); font-size: 15px; margin: 0 0 12px; }
html .tito-filtro { position: relative; flex: 1 1 280px; max-width: 420px; display: block; }
html .tito-filtro .tito-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--tito-muted); }
html .tito-filtro input.tito-modelos__filtro { width: 100%; padding: 10px 12px 10px 38px; border: 1px solid #c9ccd8; border-radius: 0; font-size: 16px; min-height: 44px; }
html .tito-modelos__filtro:focus { outline: 2px solid var(--tito-blue); border-color: var(--tito-blue); }

html .tito-modelos__wrap { overflow-x: auto; border: 1px solid var(--tito-line); }
html .tito-tabela { width: 100%; border-collapse: collapse; margin: 0; font-size: 16px; color: var(--tito-text); }
html .tito-tabela thead th { background: var(--tito-navy); color: #fff; text-align: left; font-weight: 600; padding: 10px 12px; white-space: nowrap; border: 0; font-family: var(--tito-font); font-size: 17px; }
html .tito-tabela tbody th,
html .tito-tabela td { padding: 7px 12px; border: 0; border-top: 1px solid var(--tito-line); text-align: left; vertical-align: middle; background: transparent; }
html .tito-tabela tbody th { font-weight: 700; color: var(--tito-navy); white-space: nowrap; }
html .tito-tabela tbody tr:nth-child(even) { background: var(--tito-zebra); }
html .tito-tabela tbody tr:hover { background: #e9ecfb; }
html .tito-tabela tbody tr.is-alvo { background: #fff4c2; box-shadow: inset 4px 0 0 var(--tito-blue); }
html .tito-tabela .tito-tabela__acao { text-align: right; width: 1%; white-space: nowrap; }
html .tito-tabela .tito-btn--add { min-width: 138px; }
html .tito-vazio { color: #b0b4c2; }
html .tito-modelos__nada { padding: 16px; margin: 0; color: var(--tito-muted); }

/* ---------- botão do carrinho (header) e flutuante ---------- */
html .tito-carrinho-btn,
html .tito-fab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 2px solid var(--tito-navy);
	background: #fff;
	color: var(--tito-navy);
	font-family: var(--tito-font);
	font-weight: 700;
	font-size: 17px;
	text-transform: uppercase;
	padding: 8px 14px;
	cursor: pointer;
	border-radius: 0;
}
html .tito-contador { display: inline-block; min-width: 1.5em; padding: 1px 6px; background: var(--tito-navy); color: #fff; text-align: center; font-size: 15px; }
html .tito-fab {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9998;
	background: var(--tito-navy);
	color: #fff;
	padding: 12px 18px;
	box-shadow: 0 10px 30px rgba(21, 31, 87, .35);
}
html .tito-fab[hidden] { display: none; }
html .tito-fab .tito-contador { background: var(--tito-whats); }
html .tito-fab:hover { background: var(--tito-navy-dk); }

/* ---------- gaveta (carrinho) ---------- */
html .tito-gaveta { position: fixed; inset: 0; z-index: 99999; }
html .tito-gaveta[hidden] { display: none; }
html .tito-gaveta__fundo { position: absolute; inset: 0; background: rgba(13, 18, 48, .55); }
html .tito-gaveta__painel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(460px, 100%);
	display: flex;
	flex-direction: column;
	background: #fff;
	color: var(--tito-text);
	box-shadow: -10px 0 40px rgba(0, 0, 0, .2);
	animation: tito-entra .2s ease-out;
	font-size: 16px;
}
@keyframes tito-entra { from { transform: translateX(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tito-gaveta__painel { animation: none; } }
html .tito-gaveta__topo { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: var(--tito-navy); color: #fff; }
html .tito-gaveta__topo h2 { margin: 0; color: #fff; font-family: var(--tito-font); font-size: 26px; }
html .tito-gaveta__x { background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; font-size: 22px; display: flex; }
html .tito-gaveta__corpo { flex: 1; overflow-y: auto; padding: 8px 20px 20px; }
html .tito-gaveta__rodape { padding: 14px 20px 18px; border-top: 1px solid var(--tito-line); display: grid; gap: 4px; justify-items: center; }

html .tito-itens { list-style: none; margin: 0; padding: 0; }
html .tito-item { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--tito-line); }
html .tito-item__txt { min-width: 0; line-height: 1.3; }
html .tito-item__txt strong { color: var(--tito-navy); font-family: var(--tito-font); font-size: 18px; margin-right: 4px; }
html .tito-item__txt a { color: var(--tito-text); text-decoration: none; }
html .tito-item__txt a:hover { text-decoration: underline; }
html .tito-item__txt small { display: block; color: var(--tito-muted); font-size: 14px; margin-top: 2px; }
html .tito-item__qtd { display: flex; border: 1px solid #c9ccd8; }
html .tito-item__qtd button { width: 32px; border: 0; background: var(--tito-zebra); color: var(--tito-navy); font-size: 18px; cursor: pointer; padding: 0; }
html .tito-item__qtd input { width: 44px; border: 0; text-align: center; font-size: 16px; padding: 6px 0; -moz-appearance: textfield; border-radius: 0; }
html .tito-item__qtd input::-webkit-inner-spin-button { -webkit-appearance: none; }
html .tito-item__x { background: none; border: 0; color: var(--tito-muted); cursor: pointer; padding: 6px; display: flex; }
html .tito-item__x:hover { color: #c62828; }

html .tito-vazio-carrinho { display: none; padding: 24px 0; text-align: center; color: var(--tito-muted); }
html .tito-gaveta.is-vazio .tito-vazio-carrinho { display: block; }
html .tito-gaveta.is-vazio .tito-form { display: none; }

html .tito-form { margin-top: 18px; }
html .tito-form h3 { font-family: var(--tito-font); color: var(--tito-navy); font-size: 21px; margin: 0 0 10px; }
html .tito-campo { display: grid; gap: 4px; margin-bottom: 12px; }
html .tito-campo-duplo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
html .tito-campo label { font-size: 14px; font-weight: 600; color: var(--tito-muted); }
html .tito-campo abbr { color: #c62828; text-decoration: none; }
html .tito-campo input,
html .tito-campo textarea { width: 100%; border: 1px solid #c9ccd8; border-radius: 0; padding: 9px 11px; font-size: 16px; font-family: inherit; background: #fff; }
html .tito-campo input:focus,
html .tito-campo textarea:focus { outline: 2px solid var(--tito-blue); border-color: var(--tito-blue); }
html .tito-erro { color: #c62828; font-weight: 600; margin: 0; }

/* ---------- toast ---------- */
html .tito-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	z-index: 99998;
	max-width: calc(100% - 32px);
	background: var(--tito-text);
	color: #fff;
	padding: 12px 16px;
	font-size: 16px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
html .tito-toast[hidden] { display: none; }
html .tito-toast button,
html .tito-toast a { background: none; border: 0; color: #8fe3ae; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0; font-size: inherit; }

/* ---------- responsivo ---------- */
@media (max-width: 900px) {
	html .tito-produto__topo,
	html .tito-produto__detalhes { grid-template-columns: 1fr; gap: 24px; }
	html .tito-produto__foto { max-width: 480px; }
}

@media (max-width: 640px) {
	html .tito-pagina { padding-top: 20px; }
	html .tito-busca .tito-btn span { display: none; }
	html .tito-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	html .tito-card__titulo { font-size: 18px; }
	html .tito-card__body { padding: 10px 12px 12px; }
	html .tito-card .tito-btn { font-size: 15px; min-height: 40px; padding: 6px 10px; }
	html .tito-acoes .tito-btn { width: 100%; }

	html .tito-modelos__wrap { border: 0; overflow: visible; }
	html .tito-tabela thead { display: none; }
	html .tito-tabela,
	html .tito-tabela tbody { display: block; }
	html .tito-tabela tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 12px; margin-bottom: 10px; border: 1px solid var(--tito-line); }
	html .tito-tabela tbody tr[hidden] { display: none; }
	html .tito-tabela tbody th,
	html .tito-tabela td { display: block; padding: 0; border: 0; }
	html .tito-tabela tbody th { grid-column: 1 / -1; font-size: 19px; }
	html .tito-tabela td::before { content: attr(data-label); display: block; font-size: 12px; color: var(--tito-muted); text-transform: uppercase; }
	html .tito-tabela .tito-tabela__acao { grid-column: 1 / -1; text-align: left; width: auto; margin-top: 6px; }
	html .tito-tabela .tito-tabela__acao::before { display: none; }
	html .tito-tabela .tito-tabela__acao .tito-btn { width: 100%; }

	html .tito-fab { right: 12px; bottom: 12px; left: 12px; justify-content: center; }
	html .tito-campo-duplo { grid-template-columns: 1fr; gap: 0; }
	html .tito-toast { bottom: 76px; }
}

/* ---------- neutraliza estilos de <button> do tema ---------- */
html .tito-gaveta__x:hover,
html .tito-gaveta__x:focus { background: rgba(255, 255, 255, .15); color: #fff; border: 0; }
html .tito-item__qtd button:hover,
html .tito-item__qtd button:focus { background: #e3e6f2; color: var(--tito-navy); }
html .tito-item__x:hover,
html .tito-item__x:focus,
html .tito-link:hover,
html .tito-link:focus { background: none; }
html .tito-link:hover { color: var(--tito-navy); }
html .tito-carrinho-btn:hover,
html .tito-carrinho-btn:focus { background: var(--tito-navy); color: #fff; }
html .tito-toast button:hover,
html .tito-toast button:focus { background: none; color: #b8f0cc; }

/* toast: texto corrido, largura confortável */
html .tito-toast { display: block; width: max-content; max-width: min(520px, calc(100% - 32px)); line-height: 1.4; }
html .tito-toast[hidden] { display: none; }
html .tito-toast button,
html .tito-toast a { margin-left: 8px; }
@media (max-width: 640px) {
	html .tito-toast { left: 16px; right: 16px; width: auto; max-width: none; transform: none; }
}
