/* =============================================================
   CONTROLDINFORMATICA — Evolve Design System
   Camada de design tokens + componentes de navegação/CTA.
   Carregado APÓS app.css para sobrepor de forma segura.
   ============================================================= */

:root {
  /* ── Brand ─────────────────────────────────────────────── */
  --ev-green: #16A34A;
  --ev-green-dark: #15803D;
  --ev-green-deep: #14532D;
  --ev-green-light: #22C55E;
  --ev-green-soft: rgba(22, 163, 74, 0.10);
  --ev-green-ring: rgba(22, 163, 74, 0.22);
  --ev-ink: #0F172A;
  --ev-ink-2: #1E293B;
  --ev-ink-3: #334155;
  --ev-muted: #64748B;
  --ev-line: #E2E8F0;
  --ev-line-soft: #EEF2F7;
  --ev-bg: #FFFFFF;
  --ev-bg-soft: #F8FAFC;
  --ev-wa: #25D366;

  /* ── Type ──────────────────────────────────────────────── */
  --ev-font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --ev-font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* ── Radius ────────────────────────────────────────────── */
  --ev-r-sm: 8px;
  --ev-r-md: 12px;
  --ev-r-lg: 16px;
  --ev-r-xl: 20px;
  --ev-r-2xl: 28px;
  --ev-r-full: 999px;

  /* ── Shadow ────────────────────────────────────────────── */
  --ev-sh-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --ev-sh-md: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  --ev-sh-lg: 0 24px 60px -20px rgba(15, 23, 42, 0.25);

  /* ── Spacing scale (rem) ───────────────────────────────── */
  --ev-sp-1: 0.25rem;
  --ev-sp-2: 0.5rem;
  --ev-sp-3: 0.75rem;
  --ev-sp-4: 1rem;
  --ev-sp-5: 1.25rem;
  --ev-sp-6: 1.5rem;
  --ev-sp-8: 2rem;
  --ev-sp-10: 2.5rem;
  --ev-sp-12: 3rem;
  --ev-sp-16: 4rem;
  --ev-sp-20: 5rem;

  --ev-nav-h: 72px;
}

/* ── Base rhythm / type ──────────────────────────────────── */
html { scroll-behavior: smooth; }
body { font-family: var(--ev-font-body); }

h1, h2, h3, h4 {
  font-family: var(--ev-font-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* ── Eyebrow ─────────────────────────────────────────────── */
.ev-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ev-green-dark);
  margin-bottom: 0.875rem;
}
.ev-eyebrow::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--ev-green);
  border-radius: 2px;
}

/* ── Section header ──────────────────────────────────────── */
.ev-section-head {
  max-width: 720px;
  margin: 0 auto 2.75rem;
  text-align: center;
}
.ev-section-head--left { text-align: left; margin-left: 0; }
.ev-section-head h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ev-ink);
  margin: 0 0 0.75rem;
}
.ev-section-head p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ev-muted);
  margin: 0;
}

/* ── Buttons ─────────────────────────────────────────────── */
.ev-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--ev-font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1;
  padding: 0.875rem 1.375rem;
  border-radius: var(--ev-r-full);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.ev-btn:hover { transform: translateY(-1px); }
.ev-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.ev-btn--primary {
  background: var(--ev-green);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(22, 163, 74, 0.55);
}
.ev-btn--primary:hover { background: var(--ev-green-dark); box-shadow: 0 12px 26px -10px rgba(22, 163, 74, 0.6); }

.ev-btn--ink {
  background: var(--ev-ink-2);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(15, 23, 42, 0.5);
}
.ev-btn--ink:hover { background: var(--ev-ink); }

.ev-btn--ghost {
  background: transparent;
  color: var(--ev-ink-2);
  border-color: var(--ev-line);
}
.ev-btn--ghost:hover { border-color: var(--ev-ink-3); background: var(--ev-bg-soft); }

.ev-btn--sm { padding: 0.625rem 1rem; font-size: 0.8125rem; }
.ev-btn--lg { padding: 1.05rem 1.75rem; font-size: 1rem; }

/* ── Product card (unificado) ────────────────────────────── */
.ev-pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  background: var(--ev-bg);
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-r-lg);
  padding: 1.375rem 1.375rem 1.25rem;
  text-decoration: none;
  color: var(--ev-ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  overflow: hidden;
}
.ev-pcard:hover {
  border-color: var(--ev-green-ring);
  box-shadow: var(--ev-sh-md);
  transform: translateY(-3px);
}
.ev-pcard__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.ev-pcard__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--ev-r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: var(--ev-green-soft);
  flex-shrink: 0;
}
.ev-pcard__cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ev-muted);
}
.ev-pcard__name {
  font-family: var(--ev-font-display);
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ev-ink);
  line-height: 1.25;
}
.ev-pcard__desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ev-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ev-pcard__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ev-green-dark);
}
.ev-pcard__cta svg { width: 14px; height: 14px; transition: transform 0.15s ease; }
.ev-pcard:hover .ev-pcard__cta svg { transform: translateX(3px); }

/* ── Product grid ────────────────────────────────────────── */
.ev-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

/* ── Filter bar (catalog) ────────────────────────────────── */
.ev-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.ev-filter-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--ev-r-full);
  border: 1px solid var(--ev-line);
  background: #fff;
  color: var(--ev-ink-3);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ev-filter-btn:hover { border-color: var(--ev-green-ring); }
.ev-filter-btn.active { background: var(--ev-green); border-color: var(--ev-green); color: #fff; }

/* ── Breadcrumb ──────────────────────────────────────────── */
.ev-breadcrumb {
  padding: calc(var(--ev-nav-h) + 1.25rem) 0 0;
  background: var(--ev-bg-soft);
  border-bottom: 1px solid var(--ev-line-soft);
}
.ev-breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 0.875rem;
  font-size: 0.8125rem;
  color: var(--ev-muted);
}
.ev-breadcrumb a { color: inherit; text-decoration: none; transition: color 0.15s ease; }
.ev-breadcrumb a:hover { color: var(--ev-green-dark); }
.ev-breadcrumb [aria-current="page"] { color: var(--ev-ink-3); font-weight: 600; }
.ev-breadcrumb .ev-crumb-sep { opacity: 0.4; }

/* ── Mega menu (grupos por necessidade) ──────────────────── */
.nav .mega-menu {
  position: fixed;
  top: calc(var(--nav-h) + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: min(880px, calc(100vw - 2rem));
  background: var(--ev-bg);
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-r-xl);
  box-shadow: var(--ev-sh-lg);
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, visibility 0.16s ease, transform 0.16s ease;
  z-index: 1200;
}
.nav .mega-menu.mega-open,
.nav .mega-menu:hover { opacity: 1; visibility: visible; pointer-events: auto; }

.mega-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.mega-group { min-width: 0; }
.mega-group-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ev-muted);
  padding: 0.25rem 0.75rem 0.625rem;
}
.mega-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--ev-r-md);
  text-decoration: none;
  color: var(--ev-ink);
  transition: background 0.14s ease;
}
.mega-item:hover { background: var(--ev-bg-soft); }
.mega-item-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--ev-r-sm);
  background: var(--ev-green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.mega-item-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mega-item-name { font-size: 0.875rem; font-weight: 700; color: var(--ev-ink); }
.mega-item-desc {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--ev-muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mega-highlight .mega-item-name::after {
  content: 'Popular';
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--ev-green-dark);
  background: var(--ev-green-soft);
  padding: 2px 7px;
  border-radius: var(--ev-r-full);
  vertical-align: middle;
  letter-spacing: 0.02em;
}

/* ── Global search ───────────────────────────────────────── */
.ev-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 40px;
  padding: 0 0.75rem;
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-r-full);
  background: var(--ev-bg-soft);
  color: var(--ev-muted);
  cursor: pointer;
  font-size: 0.8125rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.ev-search-btn:hover { border-color: var(--ev-green-ring); color: var(--ev-ink-2); }
.ev-search-btn svg { width: 16px; height: 16px; }
.ev-search-btn kbd {
  font-family: var(--ev-font-body);
  font-size: 0.65rem;
  color: var(--ev-muted);
  background: #fff;
  border: 1px solid var(--ev-line);
  border-radius: 5px;
  padding: 1px 5px;
}

.ev-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 1rem 1rem;
}
.ev-search-overlay.open { display: flex; }
.ev-search-panel {
  width: min(640px, 100%);
  background: var(--ev-bg);
  border-radius: var(--ev-r-xl);
  box-shadow: var(--ev-sh-lg);
  overflow: hidden;
}
.ev-search-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ev-line);
}
.ev-search-input-row svg { width: 20px; height: 20px; color: var(--ev-muted); flex-shrink: 0; }
.ev-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.0625rem;
  font-family: var(--ev-font-body);
  color: var(--ev-ink);
  background: transparent;
}
.ev-search-close {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--ev-muted);
  font-size: 1.1rem;
  padding: 0.25rem;
  line-height: 1;
}
.ev-search-results { max-height: 55vh; overflow-y: auto; padding: 0.625rem; }
.ev-search-group { padding: 0.375rem 0.5rem 0.25rem; }
.ev-search-group-label {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ev-muted);
  padding: 0.375rem 0.5rem;
}
.ev-search-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--ev-r-md);
  text-decoration: none;
  color: var(--ev-ink);
  transition: background 0.14s ease;
}
.ev-search-item:hover { background: var(--ev-bg-soft); }
.ev-search-item-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--ev-r-sm);
  background: var(--ev-green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.ev-search-item-text { min-width: 0; }
.ev-search-item-name { font-size: 0.875rem; font-weight: 700; }
.ev-search-item-desc {
  font-size: 0.75rem;
  color: var(--ev-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-search-empty { padding: 2.5rem 1rem; text-align: center; color: var(--ev-muted); font-size: 0.9rem; }

/* ── Sticky anchor subnav (product pages) ────────────────── */
.ev-subnav {
  position: sticky;
  top: var(--ev-nav-h);
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ev-line);
}
.ev-subnav__inner {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  scrollbar-width: none;
}
.ev-subnav__inner::-webkit-scrollbar { display: none; }
.ev-subnav__link {
  flex-shrink: 0;
  padding: 0.5rem 0.875rem;
  border-radius: var(--ev-r-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ev-muted);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}
.ev-subnav__link:hover { color: var(--ev-ink); }
.ev-subnav__link.active { color: var(--ev-green-dark); background: var(--ev-green-soft); }

/* ── FAQ category chips ──────────────────────────────────── */
.ev-faq-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}
.ev-faq-chip {
  padding: 0.45rem 0.9rem;
  border-radius: var(--ev-r-full);
  border: 1px solid var(--ev-line);
  background: #fff;
  color: var(--ev-ink-3);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ev-faq-chip:hover { border-color: var(--ev-green-ring); }
.ev-faq-chip.active { background: var(--ev-green); border-color: var(--ev-green); color: #fff; }

/* ── Back to top ─────────────────────────────────────────── */
.ev-backtop {
  position: fixed;
  bottom: 6rem;
  right: 1.5rem;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: var(--ev-r-full);
  border: 1px solid var(--ev-line);
  background: #fff;
  color: var(--ev-ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--ev-sh-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.ev-backtop.show { opacity: 1; visibility: visible; transform: translateY(0); }
.ev-backtop:hover { border-color: var(--ev-green); color: var(--ev-green-dark); }
.ev-backtop svg { width: 18px; height: 18px; }

/* ── Mobile menu helpers ─────────────────────────────────── */
.nav-mobile-subtitle {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ev-muted);
  padding: 0.875rem 1rem 0.375rem;
}
.nav-mobile-link--all {
  font-weight: 700;
  color: var(--ev-green-dark);
}

/* ── Rhythm / whitespace helpers ─────────────────────────── */
.ev-section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.ev-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .mega-groups { grid-template-columns: 1fr; }
  .nav .mega-menu { left: 1rem; right: 1rem; transform: none; width: auto; }
}
@media (max-width: 640px) {
  .ev-backtop { bottom: 5.5rem; right: 1rem; }
  .nav-actions .lang-switcher,
  .nav-actions .theme-toggle { display: none; }
  .nav-actions { margin-left: auto; }
  .nav-inner { gap: 0.625rem; }
  .nav-logo-img { max-width: 136px; height: auto; }
}

/* ── Footer: 4 colunas após remoção da coluna Produtos ────── */
@media (min-width: 1025px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }
}
