/* ══════════════════════════════════════════════
   LAYOUT.CSS — Compra Turbo
   Grid system, header, footer, containers
   Dependencias: tokens.css
   ══════════════════════════════════════════════ */

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

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

/* ── SECOES ────────────────────────────────── */
.section {
  padding: var(--section-padding) 0;
  position: relative;
  overflow: hidden;
}

.section--dark {
  background: var(--bg-primary);
  color: var(--text-white);
}

.section--dark-alt {
  background: var(--bg-alt);
  color: var(--text-white);
}

.section--light {
  background: var(--bg-light);
  color: var(--text-dark);
}

.section--cta {
  background: var(--bg-cta);
  color: var(--color-black);
}

/* Separador sutil entre secoes dark */
.section--dark + .section--dark::before,
.section--dark-alt + .section--dark-alt::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-section), transparent);
}

/* ── HEADER / NAV ──────────────────────────── */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-nav);
  transition: background var(--duration-normal) ease,
              border-color var(--duration-normal) ease;
  border-bottom: 1px solid transparent;
}

.header--scrolled {
  background: var(--overlay-heavy);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border-subtle);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

/* Logo */
.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-heading);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text-white);
  z-index: 2;
}

.header__logo svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

/* Nav desktop */
.header__nav {
  display: flex;
  align-items: center;
  gap: var(--nav-gap);
}

.header__link {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-muted-3);
  transition: color var(--duration-fast) ease;
  position: relative;
}

.header__link:hover,
.header__link--active {
  color: var(--text-white);
}

.header__link--active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--brand-orange);
}

/* CTA no header */
.header__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-orange);
  color: var(--text-white);
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(212, 80, 10, 0.25);
  transition: background var(--duration-fast) ease,
              transform var(--duration-fast) ease,
              box-shadow var(--duration-fast) ease;
}

.header__cta:hover {
  background: var(--brand-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212, 80, 10, 0.4);
}

/* Hamburger (mobile) */
.header__burger {
  display: none;
  background: none;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  /* 12px + 20px SVG = 44x44 touch target WCAG AA */
  padding: 12px;
  color: var(--text-white);
  z-index: 2;
}

.header__burger svg {
  width: 20px;
  height: 20px;
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 72px 0 0;
  background: var(--bg-primary);
  z-index: calc(var(--z-nav) - 1);
  padding: var(--space-xl) var(--gutter);
  flex-direction: column;
  overflow-y: auto;
  display: flex;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity var(--duration-normal) var(--ease-out),
              visibility var(--duration-normal),
              transform var(--duration-normal) var(--ease-out);
}

.mobile-menu--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-menu__link {
  font-family: var(--ff-heading);
  font-size: 28px;
  font-weight: 900;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-card);
  color: var(--text-muted-3);
  transition: color var(--duration-fast) ease;
  display: block;
}

.mobile-menu__link:hover {
  color: var(--text-white);
}

.mobile-menu__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brand-orange);
  color: var(--text-white);
  padding: 18px;
  border-radius: var(--radius-sm);
  font-family: var(--ff-heading);
  font-size: 18px;
  font-weight: 900;
  margin-top: var(--space-xl);
}

/* ── FOOTER ────────────────────────────────── */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-3xl) 0 var(--space-xl);
  position: relative;
  overflow: hidden;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-lg);
}

/* Logo no footer */
.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-heading);
  font-weight: 900;
  font-size: 18px;
  color: var(--text-white);
}

.footer__tagline {
  font-size: var(--fs-small);
  color: var(--text-muted-4);
  line-height: 1.7;
  max-width: 300px;
}

.footer__cnpj {
  font-size: var(--fs-xs);
  color: var(--text-disabled);
  letter-spacing: 0.03em;
}

/* Colunas do footer */
.footer__col-title {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted-4);
  margin-bottom: var(--space-md);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer__links a {
  font-size: 13.5px;
  color: var(--text-muted-4);
  transition: color var(--duration-fast) ease;
}

.footer__links a:hover {
  color: var(--text-white);
}

/* Dados de contato no footer */
.footer__contact-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-orange);
  margin-bottom: var(--space-xs);
}

.footer__contact-label:not(:first-child) {
  margin-top: var(--space-md);
}

.footer__contact-text {
  font-size: var(--fs-xs);
  color: var(--text-muted-4);
  line-height: 1.7;
}

/* Bottom bar */
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__copy {
  font-size: 12px;
  color: var(--text-disabled);
}

.footer__legal {
  display: flex;
  gap: 22px;
}

.footer__legal a {
  font-size: 12px;
  color: var(--text-disabled);
  transition: color var(--duration-fast) ease;
}

.footer__legal a:hover {
  color: var(--text-muted-3);
}

/* Watermark decorativo */
.footer__watermark {
  position: absolute;
  bottom: -20px;
  right: -20px;
  font-family: var(--ff-heading);
  font-weight: 900;
  font-size: clamp(80px, 12vw, 180px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--watermark-alpha);
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}

/* Consumidor no footer */
.footer__consumer {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.footer__consumer p {
  font-size: 13px;
  color: var(--text-muted-4);
}

.footer__consumer a {
  color: var(--brand-orange);
  font-weight: 500;
}

/* ── WHATSAPP BUTTON ───────────────────────── */
.whatsapp-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: var(--z-overlay);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-whatsapp);
  transition: transform var(--duration-fast) ease,
              box-shadow var(--duration-fast) ease;
}

.whatsapp-btn:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: var(--shadow-whatsapp-hover);
}

.whatsapp-btn svg {
  width: 24px;
  height: 24px;
  fill: white;
}

/* Tooltip no hover */
.whatsapp-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 60px;
  background: var(--overlay-dark);
  color: var(--text-white);
  font-family: var(--ff-body);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity var(--duration-fast) ease,
              transform var(--duration-fast) ease;
  pointer-events: none;
  border: 1px solid var(--border-card);
}

.whatsapp-btn:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* ── GRID UTILITIES ────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
}

/* ── SPACER ────────────────────────────────── */
.spacer {
  height: var(--space-4xl);
}
