/*
Theme Name: Feira de Pato Branco
Theme URI: https://patobranco.com/feira
Author: Portal da Feira
Description: Tema do portal de valorização do artesanato e da economia local de Pato Branco. Inclui os post types de feirantes, peças e eventos, e um assistente que cria as páginas e o menu automaticamente.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: feira-pb
*/

:root {
  --barro: #B4502C;
  --barro-esc: #8E3C1F;
  --verde: #3F5E43;
  --verde-esc: #2E4632;
  --sisal: #F0E7D8;
  --sisal-esc: #E7DBC6;
  --papel: #FAF6EF;
  --tinta: #241D16;
  --tinta-70: #4A3F32;
  --tinta-50: #6B5C47;
  --trigo: #E7C99B;
  --linha: #E4D9C6;
  --raio: 16px;
  --sombra: 0 1px 2px rgba(36, 29, 22, .06);
  --sombra-alta: 0 8px 20px rgba(36, 29, 22, .10);
  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

body.fpb {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: 'Public Sans', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--barro); text-decoration: none; }
a:hover { color: var(--barro-esc); text-decoration: underline; }
::selection { background: var(--trigo); }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding-top: 96px; }
.section--tight { padding-top: 56px; }
@media (max-width: 640px) { .section { padding-top: 56px; } }

/* --- tipografia --- */
.eyebrow, .mono {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow { color: var(--barro); margin-bottom: 12px; }
.mono-mut { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--tinta-50); }
h1, h2, h3, .display { font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif; letter-spacing: -0.02em; margin: 0; }
.display { font-weight: 800; font-size: clamp(38px, 6.2vw, 68px); line-height: 1.01; }
h1 { font-weight: 800; font-size: clamp(32px, 4.6vw, 50px); line-height: 1.04; }
h2 { font-weight: 700; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.08; letter-spacing: -0.015em; }
h3 { font-weight: 700; font-size: 20px; line-height: 1.2; letter-spacing: 0; }
.lead { font-size: 18px; line-height: 1.6; color: var(--tinta-70); max-width: 58ch; text-wrap: pretty; }
.meta { font-size: 14px; color: var(--tinta-50); }
.rule { border-top: 2px solid var(--tinta); padding-top: 24px; }

/* --- botões --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 16px/1 'Public Sans', sans-serif;
  border-radius: 999px; padding: 16px 26px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; min-height: 44px; transition: background .18s ease, color .18s ease;
}
.btn:hover { text-decoration: none; }
.btn--sm { font-size: 14px; padding: 12px 18px; }
.btn--primary { background: var(--barro); color: var(--papel); }
.btn--primary:hover { background: var(--barro-esc); color: var(--papel); }
.btn--verde { background: var(--verde); color: var(--papel); }
.btn--verde:hover { background: var(--verde-esc); color: var(--papel); }
.btn--outline { border-color: var(--tinta); color: var(--tinta); background: transparent; }
.btn--outline:hover { background: var(--tinta); color: var(--papel); }
.btn--ghost-light { border-color: rgba(250, 246, 239, .55); color: var(--papel); background: transparent; }
.btn--ghost-light:hover { background: rgba(250, 246, 239, .12); color: var(--papel); }
.btn--soft { background: var(--sisal); color: var(--tinta); }
.btn--soft:hover { background: var(--tinta); color: var(--papel); }
.btn--trigo { background: var(--trigo); color: #243026; }
.btn--trigo:hover { background: #F4F7F2; color: #243026; }

/* --- header --- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 246, 239, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--linha); }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: 14px 24px; max-width: var(--container); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; text-decoration: none; color: var(--tinta); }
.brand:hover { text-decoration: none; color: var(--tinta); }
.brand__mark { width: 34px; height: 34px; border-radius: 10px; background: var(--barro); color: var(--papel); display: grid; place-items: center; font: 800 16px 'Bricolage Grotesque', sans-serif; }
.brand__name { font: 700 17px/1.1 'Bricolage Grotesque', sans-serif; }
.brand__sub { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-50); margin-top: 2px; }
.nav ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; font: 500 14px/1 'Public Sans', sans-serif; color: #3D3327; padding: 13px 14px; border-radius: 999px; }
.nav a:hover { background: var(--sisal); color: var(--tinta); text-decoration: none; }
.nav .current-menu-item > a, .nav .current_page_item > a { background: var(--sisal); }
.header-rule { height: 3px; background: linear-gradient(90deg, var(--barro) 0 33%, #D89B3C 33% 66%, var(--verde) 66% 100%); }
.rain-notice { background: var(--tinta); color: var(--papel); text-align: center; padding: 12px 24px; font-size: 15px; }

/* --- placeholders de imagem --- */
.ph {
  background: repeating-linear-gradient(135deg, var(--sisal-esc) 0 8px, var(--sisal) 8px 16px);
  display: grid; place-items: center; text-align: center; padding: 12px;
}
.ph span { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-50); }
.media { overflow: hidden; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--4x5 { aspect-ratio: 4 / 5; }
.media img { width: 100%; height: 100%; object-fit: cover; }

/* --- hero --- */
.hero { position: relative; display: flex; align-items: flex-end; min-height: min(78vh, 620px); background: var(--tinta); background-size: cover; background-position: center; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(36, 29, 22, .35) 0%, rgba(36, 29, 22, .78) 100%); }
.hero__inner { position: relative; z-index: 1; width: 100%; max-width: var(--container); margin: 0 auto; padding: 80px 24px 72px; }
.hero .eyebrow { color: var(--trigo); margin-bottom: 18px; }
.hero .display { color: var(--papel); max-width: 22ch; margin-bottom: 20px; text-wrap: balance; }
.hero__support { font-size: clamp(17px, 2vw, 20px); line-height: 1.55; color: var(--papel); max-width: 54ch; margin: 0 0 32px; text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* --- faixa da feira --- */
.strip { background: var(--verde); border-radius: 24px; padding: clamp(24px, 3vw, 36px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 24px; align-items: center; }
.strip__label { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #B7D0B4; margin-bottom: 8px; }
.strip__big { font: 800 34px/1 'Bricolage Grotesque', sans-serif; color: #F4F7F2; }
.strip__val { font: 700 22px/1.2 'Bricolage Grotesque', sans-serif; color: #F4F7F2; }
.strip__note { font-size: 14px; color: #D8E5D6; margin-top: 6px; }

/* --- grids e cards --- */
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.grid--narrow { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.card { display: flex; flex-direction: column; border: 1px solid var(--linha); background: #fff; border-radius: var(--raio); overflow: hidden; box-shadow: var(--sombra); transition: transform .18s ease, box-shadow .18s ease; text-decoration: none; color: inherit; }
.card:hover { transform: translateY(-2px); box-shadow: var(--sombra-alta); text-decoration: none; color: inherit; }
.card__body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__title { font: 700 19px/1.2 'Bricolage Grotesque', sans-serif; }
.card__nicho { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--barro); }
.card__cta { margin-top: auto; }
.card__price { color: var(--barro); font-weight: 600; font-size: 15px; }

/* --- busca e filtros --- */
.page-head { background: var(--sisal); border-bottom: 1px solid var(--linha); padding: 64px 0 40px; }
.searchbar { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--linha); border-radius: 999px; padding: 6px 6px 6px 20px; max-width: 620px; box-shadow: var(--sombra); }
.searchbar input[type="search"], .searchbar input[type="text"] { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 400 16px 'Public Sans', sans-serif; color: var(--tinta); padding: 12px 0; }
.filterbar { position: sticky; top: 78px; z-index: 30; background: rgba(250, 246, 239, .95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linha); }
.filterbar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 24px; max-width: var(--container); margin: 0 auto; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 1px solid #D9CBB4; background: #fff; color: #3D3327; font: 500 14px 'Public Sans', sans-serif; }
.chip:hover { border-color: var(--barro); color: var(--barro); text-decoration: none; }
.chip.is-active { background: var(--tinta); border-color: var(--tinta); color: var(--papel); }
.count { margin-left: auto; font-size: 14px; color: var(--tinta-50); white-space: nowrap; }

/* --- perfil --- */
.profile { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 36px; align-items: start; }
.profile__photo { border: 1px solid var(--linha); border-radius: 20px; overflow: hidden; }
.profile__sub { font-size: 17px; color: var(--tinta-50); margin: 6px 0 24px; }
.factgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 14px; }
.fact { background: var(--sisal); border-radius: 14px; padding: 18px 20px; }
.fact__val { font: 700 22px/1.3 'Bricolage Grotesque', sans-serif; margin-top: 6px; }
.breadcrumb { font-size: 14px; color: var(--tinta-50); padding-top: 28px; }

/* --- eventos --- */
.event { border: 1px solid var(--linha); background: #fff; border-radius: 18px; padding: clamp(20px, 2.5vw, 28px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 24px; align-items: center; box-shadow: var(--sombra); transition: border-color .18s ease; }
.event:hover { border-color: var(--barro); }
.event:first-child { border-color: var(--barro); }
.event__head { display: flex; align-items: center; gap: 18px; }
.date-badge { flex: 0 0 auto; width: 84px; height: 84px; border-radius: var(--raio); background: var(--tinta); color: var(--papel); display: grid; place-content: center; text-align: center; }
.date-badge b { font: 800 30px/1 'Bricolage Grotesque', sans-serif; }
.date-badge span { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #C4B49B; }
.tag-verde { font: 600 13px 'Public Sans', sans-serif; color: var(--verde); background: #E6EFE4; border-radius: 999px; padding: 8px 14px; white-space: nowrap; }
.weekly { background: var(--tinta); color: var(--papel); border-radius: 24px; padding: clamp(24px, 3.5vw, 44px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 28px; align-items: start; }
.weekly__title { grid-column: 1 / -1; }
.weekly__title h2 { color: var(--papel); }
.weekly .mono-mut { color: #C4B49B; }
.weekly__val { font: 700 22px/1.3 'Bricolage Grotesque', sans-serif; margin-top: 8px; }
.weekly__val--trigo { color: var(--trigo); }

/* --- blocos institucionais --- */
.split { border-radius: 24px; overflow: hidden; background: var(--sisal); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.split__text { padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; }
.split__media { min-height: 280px; }
.cta-band { background: var(--sisal); border-radius: 24px; padding: clamp(24px, 3.5vw, 44px); display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }

/* --- footer --- */
.site-footer { margin-top: 96px; background: var(--tinta); color: rgba(250, 246, 239, .72); }
.site-footer__inner { max-width: var(--container); margin: 0 auto; padding: 56px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 32px; }
.site-footer h3 { color: var(--papel); font-size: 20px; margin-bottom: 10px; }
.site-footer .mono-mut { color: #C4B49B; margin-bottom: 12px; }
.site-footer a { color: rgba(250, 246, 239, .8); }
.site-footer a:hover { color: var(--trigo); }
.footer-links { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--linha); color: var(--tinta); padding: 0 12px; }
.pagination .current { background: var(--tinta); color: var(--papel); border-color: var(--tinta); }
.empty { border: 1px dashed #C4B49B; border-radius: var(--raio); padding: 40px; text-align: center; color: var(--tinta-50); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
