/*
Theme Name: Promo & Ofertas
Description: Tema para site de cupons de desconto e cashback, com a paleta roxo e laranja da marca. Funciona com o plugin Vitrine de Cupons.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: promo-ofertas
*/

:root {
	--po-roxo: #6a00d0;
	--po-roxo-escuro: #3f0a7d;
	--po-laranja: #ff6600;
	--po-laranja-escuro: #d94f00;
	--po-lilas: #f4edfd;
	--po-borda: #e7e0f1;
	--po-texto: #2a2238;
	--po-texto-suave: #6b6178;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: #fff;
	color: var(--po-texto);
	font-family: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	line-height: 1.6;
}
a { color: var(--po-roxo); }
a:hover { color: var(--po-roxo-escuro); }
img { max-width: 100%; height: auto; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.po-skip { position: absolute; left: -999px; top: 8px; background: var(--po-roxo); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.po-skip:focus { left: 8px; }

.po-container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- Cabeçalho ---------- */
.po-header { background: #fff; border-bottom: 1px solid var(--po-borda); }
.po-header__topo { display: flex; align-items: center; gap: 24px; min-height: 76px; }

.po-marca { flex: 0 0 auto; line-height: 0; }
.po-marca img { height: 40px; width: auto; display: block; }
.po-marca .custom-logo { height: 40px; width: auto; }

.po-busca { position: relative; flex: 1; max-width: 560px; }
.po-busca svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--po-texto-suave); pointer-events: none; }
.po-busca input[type="search"] {
	width: 100%; height: 46px; border: 2px solid transparent; border-radius: 999px;
	background: var(--po-lilas); padding: 0 20px 0 46px; font: inherit; font-size: 15px; color: var(--po-texto);
}
.po-busca input[type="search"]::placeholder { color: var(--po-texto-suave); }
.po-busca input[type="search"]:focus { outline: none; border-color: var(--po-roxo); background: #fff; }

.po-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; }
.po-menu a { text-decoration: none; color: var(--po-texto); }
.po-nav-topo { margin-left: auto; }
.po-nav-topo .po-menu a { font-size: 15px; }
.po-nav-topo .po-menu a:hover { color: var(--po-roxo); }

.po-conta { display: flex; align-items: center; gap: 18px; }
.po-conta__link { font-weight: 800; font-size: 14px; text-decoration: none; color: var(--po-texto); }
.po-conta__link:hover { color: var(--po-roxo); }

.po-btn {
	display: inline-block; padding: 10px 20px; border-radius: 999px; background: var(--po-laranja);
	color: var(--po-roxo-escuro); font-weight: 800; font-size: 14px; text-decoration: none; line-height: 1.2;
}
.po-btn:hover { background: var(--po-laranja-escuro); color: #fff; }

.po-cats { border-top: 1px solid var(--po-borda); }
.po-cats .po-container { overflow-x: auto; scrollbar-width: none; }
.po-cats .po-container::-webkit-scrollbar { display: none; }
.po-cats .po-menu { gap: 30px; white-space: nowrap; }
.po-cats .po-menu a { display: block; padding: 13px 0 10px; font-size: 15px; border-bottom: 3px solid transparent; }
.po-cats .po-menu a:hover,
.po-cats .po-menu .current-menu-item > a { color: var(--po-roxo); border-bottom-color: var(--po-laranja); }

a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--po-laranja); outline-offset: 2px; }

/* ---------- Conteúdo ---------- */
.po-main { min-height: 50vh; }
.po-conteudo { padding-top: 40px; padding-bottom: 56px; }
.po-titulo { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; line-height: 1.2; margin: 0 0 24px; color: var(--po-roxo-escuro); }
.po-meta { color: var(--po-texto-suave); font-size: 14px; margin: -12px 0 24px; }
.po-artigo { max-width: 760px; margin: 0 auto; }
.po-artigo .po-titulo { text-align: left; }
.po-conteudo > .entry, .po-conteudo { overflow-wrap: break-word; }

.po-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.po-post { border: 2px solid var(--po-borda); border-radius: 8px; padding: 16px; background: #fff; }
.po-post h2 { font-size: 18px; margin: 8px 0; line-height: 1.3; }
.po-post h2 a { text-decoration: none; color: var(--po-texto); }
.po-post h2 a:hover { color: var(--po-roxo); }
.po-post p { margin: 0; color: var(--po-texto-suave); font-size: 14px; }
.po-post--linha { margin-bottom: 12px; }

.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pagination .page-numbers { padding: 8px 14px; border-radius: 999px; border: 2px solid var(--po-borda); text-decoration: none; color: var(--po-texto); font-weight: 700; }
.pagination .page-numbers.current { background: var(--po-roxo); border-color: var(--po-roxo); color: #fff; }

.po-404 .po-busca { max-width: 480px; margin: 16px 0 24px; }

/* ---------- Rodapé ---------- */
.po-footer { margin-top: 48px; background: var(--po-lilas); border-top: 4px solid var(--po-laranja); }
.po-footer__grade { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 44px; padding-bottom: 36px; }
.po-footer__marca p { margin: 14px 0 0; max-width: 340px; color: var(--po-texto-suave); font-size: 15px; }
.po-widget__titulo { margin: 0 0 12px; font-size: 16px; font-weight: 800; color: var(--po-roxo-escuro); }
.po-widget ul { list-style: none; margin: 0; padding: 0; }
.po-widget li { margin-bottom: 8px; }
.po-widget a { color: var(--po-texto); text-decoration: none; font-size: 15px; }
.po-widget a:hover { color: var(--po-roxo); text-decoration: underline; }
.po-footer__base { border-top: 1px solid var(--po-borda); padding: 18px 0 26px; font-size: 13px; color: var(--po-texto-suave); }
.po-footer__base p { margin: 0 0 6px; }

/* ---------- Plugin Vitrine de Cupons com a paleta da marca ---------- */
body .vc-pagina, body .vc-grid, body .vc-lista {
	--vc-vermelho: var(--po-roxo);
	--vc-vermelho-escuro: var(--po-laranja);
	--vc-laranja: var(--po-laranja-escuro);
	--vc-azul: var(--po-roxo);
	--vc-texto: var(--po-texto);
	--vc-borda: var(--po-borda);
	--vc-cinza: var(--po-lilas);
	font-family: inherit;
}
body .vc-badge--top { background: var(--po-roxo); }
body .vc-h1 { color: var(--po-roxo-escuro); }
body .vc-btn--oferta { background: var(--po-roxo); }
body .vc-carregar:hover { background: var(--po-roxo-escuro); }
body .vc-regras-toggle:hover { color: var(--po-roxo-escuro); }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
	.po-posts { grid-template-columns: repeat(2, 1fr); }
	.po-footer__grade { grid-template-columns: 1fr 1fr; }
	.po-footer__marca { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
	.po-header__topo { flex-wrap: wrap; gap: 12px 16px; padding-top: 12px; padding-bottom: 12px; min-height: 0; }
	.po-conta { margin-left: auto; }
	.po-nav-topo { display: none; }
	.po-busca { order: 3; flex: 1 0 100%; max-width: none; }
}
@media (max-width: 560px) {
	.po-posts { grid-template-columns: 1fr; }
	.po-footer__grade { grid-template-columns: 1fr; gap: 28px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
