/* =====================================================================
   C&G PLANEJADOS — Design System
   Paleta: madeira tostada + creme + âmbar | Tipo: Cormorant + Manrope
   ===================================================================== */

/* ============ TOKENS ============ */
:root {
  /* Cores */
  --ink: #2a1f17;         /* texto principal, contornos */
  --ink-2: #4a3624;       /* texto secundário */
  --ink-3: #7a6249;       /* metadados */
  --paper: #f5ecdf;       /* fundo principal */
  --paper-2: #ede0cb;     /* fundo de blocos */
  --paper-3: #e2d2b5;     /* fundos densos */
  --rust: #a8552a;        /* acento principal — madeira queimada */
  --amber: #c89456;       /* acento secundário — óleo de linhaça */
  --moss: #6a7548;        /* verde musgo (plantas) */
  --white: #fffaf3;

  /* Estados */
  --success: #4b6b3a;
  --error: #a13b2a;

  /* Tipografia */
  --serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Escala */
  --max: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 4px;
  --radius-lg: 12px;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(42, 31, 23, 0.06);
  --shadow: 0 8px 24px -12px rgba(42, 31, 23, 0.2);
  --shadow-lg: 0 24px 48px -24px rgba(42, 31, 23, 0.35);

  /* Transições */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 0.18s var(--ease);
  --t: 0.3s var(--ease);
  --t-slow: 0.6s var(--ease);
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; border-radius: 2px; }

/* Grão sutil de papel — atmosfera artesanal sem peso de imagem */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .16 0 0 0 0 .12 0 0 0 0 .08 0 0 0 .22 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

/* ============ TIPOGRAFIA ============ */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: clamp(2.5rem, 6.5vw, 5rem); font-weight: 400; }
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; font-weight: 600; }

em { font-style: italic; color: var(--rust); }

/* Pequenos textos sobre-marcadores */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--rust);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
}

.lede {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink-2);
  font-style: italic;
}

/* Acessibilidade */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  z-index: 100;
  font-weight: 600;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { top: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 236, 223, 0.88);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), padding var(--t);
}
.nav.scrolled {
  border-bottom-color: rgba(42, 31, 23, 0.1);
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-mark {
  min-width: 42px; height: 36px;
  padding: 0 0.5rem;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand-text small {
  display: block;
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 1px;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-links a {
  position: relative;
  padding: 0.25rem 0;
  transition: color var(--t-fast);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--rust);
  transition: width var(--t);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--rust); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }

.nav-cta {
  padding: 0.7rem 1.3rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--t-fast), transform var(--t-fast);
}
.nav-cta:hover { background: var(--rust); transform: translateY(-1px); }
.nav-cta svg { width: 14px; height: 14px; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  gap: 5px;
  flex-direction: column;
}
.nav-toggle span {
  width: 22px; height: 1.5px;
  background: var(--ink);
  transition: transform var(--t), opacity var(--t-fast);
}
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-links, .nav .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

.mobile-menu {
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--paper);
  border-bottom: 1px solid rgba(42, 31, 23, 0.1);
  padding: 1.5rem var(--gutter) 2rem;
  transform: translateY(-110%);
  transition: transform var(--t);
  z-index: 49;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a {
  font-family: var(--serif);
  font-size: 1.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(42, 31, 23, 0.08);
}
.mobile-menu .nav-cta {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 0.75rem;
  font-family: var(--sans);
  font-size: 0.95rem;
}

/* ============ LAYOUT BASE ============ */
main { position: relative; z-index: 2; padding-top: 64px; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(4rem, 9vw, 7rem) 0;
  position: relative;
  z-index: 2;
}
.section-head {
  max-width: 720px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head .eyebrow { margin-bottom: 1.25rem; }
.section-head .lede { margin-top: 1.25rem; }

.section-alt { background: var(--paper-2); }
.section-dark { background: var(--ink); color: var(--paper); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--paper); }
.section-dark .eyebrow { color: var(--amber); }
.section-dark .lede { color: rgba(245, 236, 223, 0.78); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: calc(100vh - 64px);
  min-height: calc(100svh - 64px);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: 5rem var(--gutter) 4rem;
  max-width: var(--max);
  margin: 0 auto;
}

.hero-art {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-art svg { width: 100%; height: 100%; }
.hero-art-tag {
  position: absolute;
  bottom: 1.25rem; left: 1.25rem;
  background: var(--paper);
  padding: 0.55rem 0.95rem;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid rgba(42, 31, 23, 0.15);
}

.hero-title {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 1.02;
}
.hero-title em { color: var(--rust); font-weight: 500; }
.hero-title .underline {
  position: relative;
  display: inline-block;
}
.hero-title .underline::after {
  content: '';
  position: absolute;
  left: -2%; right: -2%; bottom: 0.08em;
  height: 0.32em;
  background: var(--amber);
  opacity: 0.4;
  z-index: -1;
  transform: skewX(-6deg);
}

.hero-lede { margin: 1.75rem 0 2rem; max-width: 52ch; }

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.hero-meta {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(42, 31, 23, 0.18);
}
.hero-meta strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.hero-meta span { font-size: 0.82rem; color: var(--ink-3); }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 3rem; min-height: auto; }
  .hero-art { aspect-ratio: 5 / 4; }
  .hero-meta { gap: 1.5rem; }
}

/* ============ BOTÕES ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.75rem;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 100px;
  transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--rust); transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(168, 85, 42, 0.5); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-wa { background: #25d366; color: white; }
.btn-wa:hover { background: #1eb558; transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(37, 211, 102, 0.5); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ============ SOBRE (about) ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 5rem;
  align-items: center;
}
@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
.about-text p { color: var(--ink-2); margin: 0 0 1rem; max-width: 56ch; }
.about-text p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 3.8em;
  float: left;
  line-height: 0.85;
  padding-top: 0.08em;
  padding-right: 0.14em;
  color: var(--rust);
  font-weight: 500;
}
.signature {
  margin-top: 2rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
}
.signature::before { content: '— '; }

.about-visual {
  position: relative;
  aspect-ratio: 1;
  background: var(--paper);
  border-radius: 2px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ============ CATEGORIAS ============ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.cat-card {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  border-radius: 3px;
  transition: transform var(--t);
  text-decoration: none;
  color: var(--paper);
}
.cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(42, 31, 23, 0.85) 100%);
  z-index: 2;
  transition: opacity var(--t);
}
.cat-card-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: transform var(--t-slow);
}
.cat-card-bg svg { width: 100%; height: 100%; }
.cat-card:hover { transform: translateY(-4px); }
.cat-card:hover .cat-card-bg { transform: scale(1.06); }
.cat-card-content {
  position: relative;
  z-index: 3;
}
.cat-card h3 { color: var(--paper); margin-bottom: 0.3rem; }
.cat-card p { color: rgba(245, 236, 223, 0.85); font-size: 0.92rem; margin: 0; }
.cat-card-arrow {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  transition: gap var(--t-fast);
}
.cat-card:hover .cat-card-arrow { gap: 0.8rem; }

.cat-badge {
  position: absolute;
  top: 1rem; left: 1rem;
  z-index: 4;
  background: rgba(245, 236, 223, 0.95);
  color: var(--ink);
  padding: 0.35rem 0.7rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 100px;
}

/* ============ CARDS DE PRODUTO ============ */
.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(42, 31, 23, 0.1);
  align-items: center;
}
.filter-search {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(42, 31, 23, 0.2);
  border-radius: 100px;
  background: var(--paper);
  transition: border-color var(--t-fast);
}
.filter-search:focus-within { border-color: var(--ink); }
.filter-search input {
  border: 0;
  background: transparent;
  outline: none;
  flex: 1;
  font-size: 0.9rem;
}
.filter-search svg { width: 16px; height: 16px; color: var(--ink-3); flex-shrink: 0; }

.filter {
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(42, 31, 23, 0.2);
  border-radius: 100px;
  background: transparent;
  color: var(--ink-2);
  transition: all var(--t-fast);
}
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--paper-2);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--t), box-shadow var(--t);
  position: relative;
  color: inherit;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* Link que cobre toda a área do card (acessível via teclado/screen reader).
   z-index 1; os elementos interativos do card (botões) ficam em z-index 2. */
.card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-decoration: none;
  color: inherit;
  /* Acessibilidade: o link tem text content vazio (label via aria-label).
     Foco visível: outline herda do :focus-visible global. */
}
.card-link:focus-visible { outline: 2px solid var(--rust); outline-offset: -3px; }

.card-media {
  aspect-ratio: 4 / 3;
  background: var(--paper-3);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;     /* Não deixar a media encolher no flex */
}
.card-media img, .card-media svg {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.card:hover .card-media img,
.card:hover .card-media svg { transform: scale(1.05); }

.card-tag {
  position: absolute;
  top: 0.9rem; left: 0.9rem;
  background: rgba(245, 236, 223, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.35rem 0.7rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border-radius: 100px;
  z-index: 2;            /* acima do card-link */
}
.card-tag.tag-rust { background: var(--rust); color: var(--paper); }
.card-tag.tag-region { background: var(--moss); color: var(--paper); }

.card-body {
  padding: 1.25rem 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;    /* contexto pro z-index */
  z-index: 1;
  pointer-events: none;  /* deixa cliques caírem no card-link por baixo */
}
.card-body > * { pointer-events: auto; }  /* texto selecionável */
.card-body .card-actions { pointer-events: auto; }
.card-body .card-actions .card-btn { position: relative; z-index: 2; }
.card-cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.5rem;
}
.card h3 { margin-bottom: 0.5rem; line-height: 1.2; }
.card-desc { font-size: 0.92rem; color: var(--ink-2); margin: 0 0 1.2rem; flex: 1; }

.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(42, 31, 23, 0.08);
}
.card-price {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
}
.card-price small { display: block; font-family: var(--sans); font-size: 0.7rem; font-weight: 500; color: var(--ink-3); margin-top: 0.2rem; letter-spacing: 0.04em; }

.card-actions { display: flex; gap: 0.4rem; }
.card-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(42, 31, 23, 0.15);
  background: var(--paper);
  transition: all var(--t-fast);
}
.card-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.card-btn.wa:hover { background: #25d366; border-color: #25d366; color: white; }
.card-btn.ml:hover { background: #2e7d32; border-color: #2e7d32; color: white; }
.card-btn svg { width: 16px; height: 16px; }

/* ============ FORMULÁRIO ============ */
.form-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}
@media (max-width: 880px) {
  .form-wrap { grid-template-columns: 1fr; gap: 2rem; }
}

.form-side h2 { margin-bottom: 1rem; }
.form-side ul {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.form-side li {
  position: relative;
  padding: 1rem 0 1rem 2.25rem;
  border-bottom: 1px solid rgba(42, 31, 23, 0.1);
  font-size: 0.95rem;
}
.form-side li::before {
  content: counter(step, decimal-leading-zero);
  counter-increment: step;
  position: absolute;
  left: 0; top: 1rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--rust);
  font-size: 1rem;
}
.form-side ul { counter-reset: step; }

form { background: var(--paper); padding: 2rem; border-radius: 3px; box-shadow: var(--shadow); }
.field { margin-bottom: 1.25rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
  color: var(--ink);
}
label .req { color: var(--rust); }

/* Labels dentro do <form> mantém cor escura porque o form tem fundo claro
   mesmo dentro de seções escuras. Não precisa de override. */

input, select, textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(42, 31, 23, 0.2);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);              /* Texto preto, mesmo em section-dark */
  font-size: 0.95rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  font-family: var(--sans);
}
/* Placeholder com cor mais clara (legível) */
input::placeholder, textarea::placeholder {
  color: var(--ink-3);
  opacity: 1;       /* normaliza Firefox que aplica opacity por padrão */
}
/* Select sempre com texto escuro, mesmo no Chrome/Safari */
select { color: var(--ink); }
select option { color: var(--ink); background: var(--white); }
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(168, 85, 42, 0.15);
}
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(161, 59, 42, 0.12);
}
.field-error {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--error);
}
input[aria-invalid="true"] + .field-error,
textarea[aria-invalid="true"] + .field-error,
select[aria-invalid="true"] + .field-error { display: block; }

/* Honeypot — escondido para humanos, visível para bots */
.hp {
  position: absolute !important;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

.form-foot {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.form-note { font-size: 0.82rem; color: var(--ink-3); display: flex; align-items: center; gap: 0.4rem; }
.form-note svg { width: 14px; height: 14px; }

/* ============ CONTATO ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.contact-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(42, 31, 23, 0.1);
}
.contact-list li svg { width: 18px; height: 18px; color: var(--rust); flex-shrink: 0; margin-top: 0.2rem; }
.contact-list strong { display: block; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 0.2rem; }
.contact-list a { color: var(--ink); text-decoration: none; transition: color var(--t-fast); }
.contact-list a:hover { color: var(--rust); }

.socials { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.social {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper);
  border: 1px solid rgba(42, 31, 23, 0.15);
  color: var(--ink);
  transition: all var(--t-fast);
}
.social:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-2px); }
.social svg { width: 16px; height: 16px; }

.map {
  border-radius: 3px;
  overflow: hidden;
  background: var(--paper-2);
  min-height: 320px;
  box-shadow: var(--shadow);
}
.map iframe { display: block; width: 100%; min-height: 320px; border: 0; }

/* ============ FOOTER ============ */
footer {
  background: var(--ink);
  color: rgba(245, 236, 223, 0.7);
  padding: 4rem var(--gutter) 2rem;
  position: relative;
  z-index: 2;
}
.foot-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(245, 236, 223, 0.1);
}
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr; gap: 2rem; } }

.foot-brand .brand-mark { background: var(--paper); color: var(--ink); }
.foot-brand .brand { color: var(--paper); }
.foot-brand .brand-text small { color: var(--amber); }
.foot-brand p { font-size: 0.9rem; line-height: 1.6; margin: 1rem 0 0; max-width: 32ch; }

.foot-col h4 { color: var(--paper); font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; margin-bottom: 1rem; }
.foot-col ul { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.foot-col li { margin-bottom: 0.6rem; }
.foot-col a { transition: color var(--t-fast); }
.foot-col a:hover { color: var(--amber); }

.foot-bottom {
  max-width: var(--max);
  margin: 2rem auto 0;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ============ FAB WHATSAPP ============ */
.fab-wa {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 40;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: white;
  display: grid; place-items: center;
  box-shadow: 0 10px 24px -8px rgba(37, 211, 102, 0.55);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.fab-wa:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 14px 28px -8px rgba(37, 211, 102, 0.65); }
.fab-wa svg { width: 26px; height: 26px; }
.fab-wa::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  z-index: -1;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  padding: 0.85rem 1.25rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: var(--shadow-lg);
  transition: transform var(--t);
  max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--error); }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ============ BREADCRUMB ============ */
.crumb {
  padding: 1rem var(--gutter);
  font-size: 0.85rem;
  color: var(--ink-3);
  border-bottom: 1px solid rgba(42, 31, 23, 0.08);
}
.crumb .container { padding: 0; }
.crumb a { color: var(--ink-2); transition: color var(--t-fast); }
.crumb a:hover { color: var(--rust); }
.crumb span { color: var(--ink); font-weight: 500; }

/* ============ PÁGINA PRODUTO ============ */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding: 4rem 0;
}
@media (max-width: 880px) { .product-detail { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 0; } }

.gallery-main {
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
  cursor: zoom-in;
}
.gallery-main img, .gallery-main svg { width: 100%; height: 100%; object-fit: cover; }

.gallery-thumbs {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.gallery-thumb {
  flex: 0 0 80px;
  aspect-ratio: 1;
  border-radius: 3px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--paper-2);
  cursor: pointer;
  transition: border-color var(--t-fast);
}
.gallery-thumb.active { border-color: var(--rust); }
.gallery-thumb img, .gallery-thumb svg { width: 100%; height: 100%; object-fit: cover; }

.product-meta { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--rust); margin-bottom: 0.75rem; }
.product-title { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-bottom: 0.5rem; }
.product-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0; }
.product-tags span {
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  background: var(--paper-2);
  color: var(--ink-2);
  border-radius: 100px;
}

.price-box {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--paper-2);
  border-radius: 3px;
}
.price {
  font-family: var(--serif);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.price small { font-family: var(--sans); font-size: 0.85rem; font-weight: 500; color: var(--ink-3); letter-spacing: 0.04em; }
.installments { font-size: 0.92rem; color: var(--ink-2); margin-bottom: 1rem; }
.installments strong { color: var(--ink); font-weight: 600; }
.stock { font-size: 0.88rem; display: flex; align-items: center; gap: 0.4rem; }
.stock.ok { color: var(--success); }
.stock.low { color: var(--amber); }
.stock.out { color: var(--error); }
.stock svg { width: 14px; height: 14px; }

.delivery-info {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(42, 31, 23, 0.1);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.delivery-info svg { width: 18px; height: 18px; color: var(--rust); flex-shrink: 0; margin-top: 0.15rem; }
.delivery-info strong { display: block; font-size: 0.85rem; }
.delivery-info span { font-size: 0.82rem; color: var(--ink-3); }

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.5rem 0;
}
@media (max-width: 480px) { .product-actions { grid-template-columns: 1fr; } }

.description h3 { font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase; margin: 2rem 0 1rem; color: var(--ink-3); font-weight: 600; }
.description ul { padding-left: 1.25rem; }
.description li { margin: 0.4rem 0; color: var(--ink-2); }
.description p { color: var(--ink-2); margin: 0 0 1rem; }

.specs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
  background: var(--paper-2);
  border-radius: 3px;
  margin-top: 1.5rem;
}
.spec dt { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 0.3rem; }
.spec dd { margin: 0; font-weight: 500; color: var(--ink); font-size: 0.95rem; }

.share { display: flex; align-items: center; gap: 0.75rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(42, 31, 23, 0.1); }
.share-label { font-size: 0.82rem; color: var(--ink-3); font-weight: 600; }

/* ============ ZOOM MODAL ============ */
.zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(42, 31, 23, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.zoom-modal.open { display: flex; }
.zoom-modal img { max-width: 100%; max-height: 90vh; object-fit: contain; }
.zoom-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--paper);
  display: grid; place-items: center;
}

/* ============ DEPOIMENTOS ============ */
.testi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.testi {
  background: var(--paper-2);
  padding: 2rem;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.testi-stars { color: var(--amber); letter-spacing: 0.15em; font-size: 1.05rem; }
.testi-text { font-family: var(--serif); font-size: 1.15rem; line-height: 1.5; color: var(--ink); font-style: italic; flex: 1; }
.testi-text::before { content: '"'; font-size: 2.5rem; color: var(--rust); line-height: 0; vertical-align: -0.4em; margin-right: 0.2rem; }
.testi-foot { display: flex; justify-content: space-between; align-items: flex-end; padding-top: 1rem; border-top: 1px solid rgba(42, 31, 23, 0.1); font-size: 0.85rem; }
.testi-author strong { display: block; font-family: var(--sans); font-weight: 600; }
.testi-author span { color: var(--ink-3); font-size: 0.8rem; }
.testi-product { font-size: 0.75rem; color: var(--rust); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; text-align: right; }

/* ============ 404 ============ */
.err-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem var(--gutter);
  text-align: center;
}
.err-page .container { max-width: 560px; }
.err-num { font-family: var(--serif); font-size: clamp(7rem, 18vw, 12rem); line-height: 0.9; color: var(--rust); font-weight: 400; margin-bottom: 1rem; }
.err-page h1 { margin-bottom: 1rem; }
.err-page p { color: var(--ink-2); margin-bottom: 2.5rem; font-size: 1.1rem; }

/* ============ MOTION REDUCED ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fab-wa::before { display: none; }
}

/* =====================================================================
   CONFIGURADOR DE ORÇAMENTO — wizard de etapas
   ===================================================================== */
.cfg-hero {
  padding: clamp(3rem, 6vw, 5rem) 0 0;
  text-align: center;
}
.cfg-hero h1 { max-width: 18ch; margin: 1.5rem auto 1rem; }
.cfg-hero .lede { margin: 0 auto 2rem; max-width: 56ch; }

#configurador {
  max-width: 880px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2rem) 5rem;
}

/* PROGRESS BAR */
.cfg-progress {
  position: relative;
  margin-bottom: 2.5rem;
  padding-top: 0.5rem;
}
.cfg-progress-bar {
  position: absolute;
  top: 1.6rem; left: 1rem; right: 1rem;
  height: 2px;
  background: var(--rust);
  transition: width 0.4s var(--ease);
  z-index: 0;
  border-radius: 1px;
}
.cfg-progress::before {
  content: '';
  position: absolute;
  top: 1.6rem; left: 1rem; right: 1rem;
  height: 2px;
  background: rgba(42, 31, 23, 0.12);
  z-index: -1;
  border-radius: 1px;
}
.cfg-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.cfg-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-3);
}
.cfg-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid rgba(42, 31, 23, 0.15);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink-3);
  transition: all var(--t-fast);
}
.cfg-step.current .cfg-step-num {
  background: var(--rust);
  border-color: var(--rust);
  color: var(--paper);
  transform: scale(1.1);
}
.cfg-step.done .cfg-step-num {
  background: var(--rust);
  border-color: var(--rust);
  color: var(--paper);
}
.cfg-step.current,
.cfg-step.done { color: var(--ink); }
@media (max-width: 600px) {
  .cfg-step-label { display: none; }
  .cfg-progress { padding-top: 0; }
  .cfg-progress-bar, .cfg-progress::before { top: 1rem; }
}

/* CONTENT */
.cfg-content {
  background: var(--paper-2);
  border-radius: 4px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.cfg-title {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  margin-bottom: 0.5rem;
}
.cfg-help {
  color: var(--ink-2);
  max-width: 58ch;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}
.cfg-aside {
  font-size: 0.85rem;
  color: var(--ink-3);
  margin-top: 1.5rem;
}

/* CARD GRID */
.cfg-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
}
.cfg-cards-2 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cfg-cards-3 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.cfg-card {
  background: var(--paper);
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 1.25rem 1rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all var(--t-fast);
  font-family: inherit;
  color: var(--ink);
}
.cfg-card:hover {
  border-color: rgba(168, 85, 42, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.cfg-card.selected {
  border-color: var(--rust);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(168, 85, 42, 0.18);
}
.cfg-card-icon {
  color: var(--ink);
  width: 56px; height: 56px;
}
.cfg-card-icon svg { width: 100%; height: 100%; }
.cfg-card.selected .cfg-card-icon { color: var(--rust); }
.cfg-card-name {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
}
.cfg-card-desc, .cfg-card-hint {
  font-size: 0.85rem;
  color: var(--ink-3);
  line-height: 1.4;
}
.cfg-card-small {
  text-align: center;
  align-items: center;
  padding: 1.5rem 1rem;
}
.cfg-card-small .cfg-card-name { font-size: 1.1rem; }

/* MADEIRAS — layout horizontal com swatch */
.cfg-madeiras {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
}
.cfg-madeira {
  background: var(--paper);
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  text-align: left;
  transition: all var(--t-fast);
  font-family: inherit;
  color: var(--ink);
}
.cfg-madeira:hover {
  border-color: rgba(168, 85, 42, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.cfg-madeira.selected {
  border-color: var(--rust);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(168, 85, 42, 0.18);
}
.cfg-madeira-swatch {
  width: 64px; height: 64px;
  border-radius: 3px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}
.cfg-madeira-swatch svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cfg-madeira-nome {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}
.cfg-madeira-desc {
  font-size: 0.85rem;
  color: var(--ink-3);
  line-height: 1.4;
}

/* RESUMO */
.cfg-resumo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(42, 31, 23, 0.12);
}
@media (max-width: 700px) {
  .cfg-resumo { grid-template-columns: 1fr; }
}
.cfg-resumo-itens {
  display: grid;
  gap: 0.5rem;
}
.cfg-resumo-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px dotted rgba(42, 31, 23, 0.08);
}
.cfg-resumo-item dt {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.cfg-resumo-item dd {
  margin: 0;
  font-weight: 500;
  color: var(--ink);
}

.cfg-price-box {
  background: var(--ink);
  color: var(--paper);
  padding: 1.5rem 1.25rem;
  border-radius: 4px;
  text-align: center;
}
.cfg-price-label {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 0.6rem;
}
.cfg-price-range {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 0.6rem;
}
.cfg-price-range span {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(245, 236, 223, 0.65);
  margin: 0 0.2rem;
}
.cfg-price-note {
  font-size: 0.78rem;
  color: rgba(245, 236, 223, 0.78);
  line-height: 1.5;
  max-width: 32ch;
  margin: 0 auto;
}

.cfg-form {
  display: grid;
  gap: 1rem;
}
.cfg-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) {
  .cfg-form-row { grid-template-columns: 1fr; }
}
.cfg-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
  color: var(--ink);
}
.cfg-field .req { color: var(--rust); }
.cfg-field input, .cfg-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(42, 31, 23, 0.2);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 0.95rem;
  font-family: var(--sans);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.cfg-field textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.cfg-field input:focus, .cfg-field textarea:focus {
  outline: none;
  border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(168, 85, 42, 0.15);
}

/* NAV BUTTONS */
.cfg-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.cfg-nav .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.cfg-nav .btn-wa { padding: 1rem 1.5rem; }

/* CTA do configurador na home */
.cfg-cta {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
  background: var(--paper-2);
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: 4px;
  box-shadow: var(--shadow);
}
.cfg-cta-text h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.05;
}
.cfg-cta-visual {
  border-radius: 4px;
  overflow: hidden;
}
.cfg-cta-visual svg {
  width: 100%; height: auto;
  display: block;
}
@media (max-width: 800px) {
  .cfg-cta {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: left;
  }
  .cfg-cta-visual { order: -1; }
}

/* =====================================================================
   PÁGINA DE MADEIRAS — guia das 7 espécies
   ===================================================================== */

/* HERO */
.mad-hero {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  background: var(--paper);
}
.mad-hero h1 {
  max-width: 14ch;
  margin: 1.5rem 0 1.25rem;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.02;
}
.mad-hero .lede {
  max-width: 60ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}

/* NAVEGAÇÃO DE CHIPS */
.mad-nav-section {
  padding: 1.5rem 0 1rem;
  background: var(--paper-2);
  border-top: 1px solid rgba(42, 31, 23, 0.08);
  border-bottom: 1px solid rgba(42, 31, 23, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}
.mad-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.mad-nav-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  background: var(--paper);
  border: 1px solid rgba(42, 31, 23, 0.1);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: all var(--t-fast);
  font-family: var(--sans);
}
.mad-nav-chip:hover {
  border-color: var(--rust);
  color: var(--rust);
  transform: translateY(-1px);
}
.mad-nav-swatch {
  width: 14px; height: 14px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

/* CARD DE MADEIRA — alterna texto/visual */
.mad-card {
  padding: clamp(3rem, 6vw, 5rem) 0;
  position: relative;
  scroll-margin-top: 80px; /* compensa nav sticky no anchor scroll */
}
.mad-card:nth-child(odd) {
  background: var(--paper);
}
.mad-card:nth-child(even) {
  background: var(--paper-2);
}
.mad-card-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.mad-card-grid-alt {
  grid-template-columns: 1fr 360px;
}
.mad-card-grid-alt .mad-visual { order: 2; }
.mad-card-grid-alt .mad-text   { order: 1; }
@media (max-width: 900px) {
  .mad-card-grid,
  .mad-card-grid-alt {
    grid-template-columns: 1fr;
  }
  .mad-card-grid-alt .mad-visual { order: 0; }
  .mad-card-grid-alt .mad-text   { order: 0; }
}

/* VISUAL: swatch + meta */
.mad-visual { position: sticky; top: 100px; }
@media (max-width: 900px) {
  .mad-visual { position: static; }
}
.mad-swatch-big {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 7 / 5;
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(42, 31, 23, 0.18));
  margin-bottom: 1.5rem;
}
.mad-swatch-big svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}
.mad-swatch-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(to top, rgba(42, 31, 23, 0.85), transparent);
  color: var(--paper);
}
.mad-swatch-name {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.1;
}
.mad-swatch-cientifico {
  font-size: 0.78rem;
  color: rgba(245, 236, 223, 0.78);
  margin-top: 0.15rem;
}

.mad-meta-grid {
  display: grid;
  gap: 0.75rem;
}
.mad-meta-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px dotted rgba(42, 31, 23, 0.12);
}
.mad-meta-item dt {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.mad-meta-item dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink);
}
.mad-stars {
  display: inline-flex;
  gap: 0.18rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-right: 0.5rem;
}
.mad-star.filled { color: var(--rust); }
.mad-stars-label {
  font-size: 0.82rem;
  color: var(--ink-2);
}

/* TEXTO DA MADEIRA */
.mad-text { padding-top: 0.5rem; }
.mad-card-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0.75rem 0 1.25rem;
  line-height: 1.15;
  max-width: 26ch;
}
.mad-desc {
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: 1.75rem;
  font-size: 1rem;
  max-width: 60ch;
}

/* INDICAÇÃO E EVITAR */
.mad-use-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 700px) {
  .mad-use-grid { grid-template-columns: 1fr; }
}
.mad-use h3 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}
.mad-use-good h3 { color: var(--moss); }
.mad-use-bad  h3 { color: var(--rust); }
.mad-use ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mad-use ul li {
  font-size: 0.92rem;
  color: var(--ink-2);
  line-height: 1.5;
  padding: 0.35rem 0;
  border-bottom: 1px dotted rgba(42, 31, 23, 0.08);
}
.mad-use ul li:last-child { border-bottom: 0; }

/* OBSERVAÇÃO DO ATELIÊ */
.mad-note {
  background: var(--paper);
  border-left: 3px solid var(--rust);
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  border-radius: 0 4px 4px 0;
}
.mad-card:nth-child(odd) .mad-note { background: var(--paper-2); }
.mad-note-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.4rem;
}
.mad-note p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
}

/* CTA NO FIM DO CARD */
.mad-cta {
  margin-top: 0.5rem;
}

/* TABELA COMPARATIVA */
.mad-table-wrap {
  overflow-x: auto;
  margin: 0 -1rem;
  padding: 0 1rem;
}
.mad-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-width: 600px;
}
.mad-table th {
  background: var(--ink);
  color: var(--paper);
  padding: 0.85rem 1rem;
  text-align: left;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.mad-table td {
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  color: var(--ink);
  border-bottom: 1px solid rgba(42, 31, 23, 0.06);
}
.mad-table tbody tr:last-child td { border-bottom: 0; }
.mad-table tbody tr:hover { background: var(--paper-2); }
.mad-table a {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  transition: color var(--t-fast);
}
.mad-table a:hover { color: var(--rust); }
.mad-table-swatch {
  width: 16px; height: 16px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
}
.mad-table-dots {
  letter-spacing: 0.12em;
  color: var(--rust);
  font-size: 0.85rem;
}

/* FAQ */
.mad-faq {
  background: var(--paper-2);
  border-radius: 4px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: all var(--t-fast);
}
.mad-faq[open] {
  background: var(--paper);
  box-shadow: var(--shadow);
}
.mad-faq summary {
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  list-style: none;
  padding-right: 3rem;
}
.mad-faq summary::-webkit-details-marker { display: none; }
.mad-faq summary::after {
  content: '+';
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--rust);
  transition: transform var(--t-fast);
}
.mad-faq[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.mad-faq p {
  padding: 0 1.25rem 1.25rem;
  color: var(--ink-2);
  line-height: 1.7;
  margin: 0;
}
.mad-faq a { color: var(--rust); font-weight: 500; }

/* =====================================================================
   GALERIA ANTES & DEPOIS — slider de cortina
   ===================================================================== */

.ga-hero {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  background: var(--paper);
}
.ga-hero h1 {
  margin: 1.5rem 0 1.25rem;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.02;
  max-width: 12ch;
}
.ga-hero .lede { max-width: 60ch; font-size: clamp(1rem, 1.6vw, 1.15rem); }
.ga-hero-help {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.5rem 1rem;
  background: var(--paper-2);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--rust);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* CARD DE PROJETO */
.ga-item {
  padding: clamp(3rem, 6vw, 5rem) 0;
  scroll-margin-top: 80px;
}
.ga-item:nth-child(odd)  { background: var(--paper); }
.ga-item:nth-child(even) { background: var(--paper-2); }

.ga-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.ga-grid-alt {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}
.ga-grid-alt .ga-slider-wrap { order: 2; }
.ga-grid-alt .ga-text        { order: 1; }

@media (max-width: 900px) {
  .ga-grid,
  .ga-grid-alt {
    grid-template-columns: 1fr;
  }
  .ga-grid-alt .ga-slider-wrap { order: 0; }
  .ga-grid-alt .ga-text        { order: 0; }
}

/* SLIDER (componente .ba) */
.ba {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  user-select: none;
  background: var(--ink);
  cursor: ew-resize;
}
.ba-after, .ba-before {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}
.ba-after svg, .ba-before svg {
  width: 100%; height: 100%;
  display: block;
}
/* clip-path do "antes" controlado por JS */
.ba-before {
  clip-path: inset(0 50% 0 0);
  will-change: clip-path;
}
.ba-dragging .ba-before {
  /* sem transição enquanto arrasta = responsivo */
}
.ba-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 48px;
  margin-left: -24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: ew-resize;
  padding: 0;
  color: var(--paper);
  z-index: 2;
}
.ba-handle::before {
  /* linha vertical */
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--paper);
  box-shadow: 0 0 12px rgba(0,0,0,0.45);
}
.ba-handle svg {
  position: relative;
  z-index: 2;
  width: 24px;
  height: 24px;
  background: var(--paper);
  color: var(--ink);
  padding: 8px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  box-sizing: content-box;
  transition: transform var(--t-fast);
}
.ba-handle:hover svg,
.ba-handle:focus-visible svg {
  transform: scale(1.1);
}
.ba-handle:focus-visible {
  outline: 0;
}
.ba-handle:focus-visible svg {
  outline: 3px solid var(--rust);
  outline-offset: 3px;
}

.ba-label {
  position: absolute;
  top: 1rem;
  padding: 0.35rem 0.75rem;
  background: rgba(42, 31, 23, 0.85);
  color: var(--paper);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 3px;
  z-index: 1;
  pointer-events: none;
}
.ba-label-before { left: 1rem; }
.ba-label-after  { right: 1rem; background: rgba(168, 85, 42, 0.95); }

/* TEXTO DO PROJETO */
.ga-text { padding: 0.5rem 0; }
.ga-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0.75rem 0 1.5rem;
  line-height: 1.15;
  max-width: 22ch;
}

.ga-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(42, 31, 23, 0.1);
  border-bottom: 1px solid rgba(42, 31, 23, 0.1);
}
.ga-meta > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.ga-meta dt {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.ga-meta dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink);
  font-weight: 500;
}

.ga-historia {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--ink);
  font-style: italic;
  max-width: 55ch;
  margin: 0;
}

@media (max-width: 600px) {
  .ga-meta { grid-template-columns: 1fr 1fr; }
  .ga-meta > div:nth-child(3) { grid-column: 1 / -1; }
}

/* Galeria — botão CTA dentro de cada projeto */
.ga-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
}
.ga-cta svg {
  width: 16px; height: 16px;
}
.ga-meta dd a {
  color: var(--rust);
  text-decoration: none;
  border-bottom: 1px dotted var(--rust);
  transition: opacity var(--t-fast);
}
.ga-meta dd a:hover { opacity: 0.7; }

/* =====================================================================
   ENTREGAS — mapa interativo do Brasil
   ===================================================================== */
.ent-hero {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  background: var(--paper);
}
.ent-hero h1 {
  max-width: 14ch;
  margin: 1.5rem 0 1.25rem;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.02;
}
.ent-hero .lede {
  max-width: 60ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}

/* Contadores */
.ent-counters {
  padding: 2.5rem 0;
  background: var(--paper-2);
  border-top: 1px solid rgba(42, 31, 23, 0.08);
  border-bottom: 1px solid rgba(42, 31, 23, 0.08);
}
.ent-counters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}
.ent-counter-num {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 500;
  color: var(--rust);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.ent-counter-label {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-2);
}

/* Map section */
.ent-map-section {
  padding: 3rem 0 1.5rem;
  background: var(--paper);
}
.br-map {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}
.br-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* Pins */
.br-pin {
  cursor: pointer;
  transition: transform var(--t-fast);
  transform-origin: center;
  transform-box: fill-box;
}
.br-pin:hover,
.br-pin:focus,
.br-pin.active {
  outline: none;
  transform: scale(1.3) translate(var(--tx, 0), var(--ty, 0));
}
/* Transform on hover é feito pelo JS (translate fica no <g>, scale aqui) — simplificamos: */
.br-pin {
  transition: filter var(--t-fast);
}
.br-pin:hover circle:first-of-type,
.br-pin:focus circle:first-of-type,
.br-pin.active circle:first-of-type {
  filter: drop-shadow(0 2px 6px rgba(168, 85, 42, 0.5));
}
.br-pin:hover circle:not(:first-of-type),
.br-pin:focus circle:not(:first-of-type),
.br-pin.active circle:not(:first-of-type) {
  filter: drop-shadow(0 2px 4px rgba(42, 31, 23, 0.5));
}

/* Tooltip */
.br-tooltip {
  position: absolute;
  background: var(--ink);
  color: var(--paper);
  padding: 0.85rem 1rem;
  border-radius: 4px;
  min-width: 220px;
  max-width: 280px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -100%);
  margin-top: -12px;
  box-shadow: var(--shadow-lg);
  z-index: 10;
  transition: opacity var(--t-fast);
  font-size: 0.85rem;
  line-height: 1.5;
}
.br-tooltip.open {
  opacity: 1;
  visibility: visible;
}
/* Setinha pra baixo */
.br-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: var(--ink);
}

.br-tooltip .tt-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--amber);
}
.br-tooltip .tt-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.br-tooltip .tt-list li {
  padding: 0.4rem 0;
  border-top: 1px solid rgba(245, 236, 223, 0.1);
}
.br-tooltip .tt-list li:first-child { border-top: 0; padding-top: 0; }
.br-tooltip .tt-list strong {
  display: block;
  font-weight: 500;
  font-family: var(--sans);
  color: var(--paper);
  font-size: 0.88rem;
}
.br-tooltip .tt-meta {
  display: block;
  font-size: 0.75rem;
  color: rgba(245, 236, 223, 0.65);
  margin-top: 0.1rem;
}

.ent-map-hint {
  text-align: center;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--ink-3);
  margin: 1.5rem auto 0;
  width: 100%;
  justify-content: center;
}

/* Tabela */
.ent-table-wrap {
  overflow-x: auto;
}
.ent-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-width: 600px;
}
.ent-table th {
  background: var(--ink);
  color: var(--paper);
  padding: 0.85rem 1rem;
  text-align: left;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.ent-table td {
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  color: var(--ink);
  border-bottom: 1px solid rgba(42, 31, 23, 0.06);
}
.ent-table tbody tr:last-child td { border-bottom: 0; }
.ent-table tbody tr:hover { background: var(--paper-2); }

@media (max-width: 600px) {
  .ent-counters-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
