/* ==========================================================================
   CRIA3D - DESIGN SYSTEM "CREME SUAVE"
   Estilo aconchegante, elegante, limpo e mobile-first para impressão 3D
   ========================================================================== */

:root {
  /* Paleta Creme Suave */
  --bg-page: #FAF5EB;
  --bg-surface: #FFFDF8;
  --bg-surface-elevated: #FFFFFF;
  --bg-surface-alt: #F4EDE0;
  --bg-surface-warm: #F8F2E6;

  /* Bordas e divisores */
  --border-subtle: #EFE6D5;
  --border-medium: #E3D7C1;
  --border-focus: #C98B5E;

  /* Tipografia & Contrastes */
  --text-main: #3B3226;
  --text-muted: #786B5A;
  --text-light: #9C8E7E;
  --text-inverse: #FFFFFF;

  /* Cores de Destaque */
  --primary: #C98B5E;          /* Terracota artesanal suave */
  --primary-hover: #B5774B;
  --primary-active: #9E653D;
  --primary-light: #F9EFE6;
  --primary-light-border: #EED7C5;

  --secondary: #8FA68A;        /* Verde sálvia relaxante */
  --secondary-hover: #7E9679;
  --secondary-light: #EEF3ED;

  /* Feedback */
  --success: #5E8C61;
  --success-bg: #EBF3EC;
  --warning: #D97757;
  --warning-bg: #FCEDE7;
  --info: #708A9B;
  --info-bg: #EAF0F4;

  /* Tipografia */
  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Raios de Arredondamento */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Sombras Suaves e Orgânicas */
  --shadow-xs: 0 1px 3px rgba(59, 50, 38, 0.04);
  --shadow-sm: 0 3px 10px rgba(59, 50, 38, 0.05);
  --shadow-md: 0 10px 28px rgba(59, 50, 38, 0.07);
  --shadow-lg: 0 18px 48px rgba(59, 50, 38, 0.10);

  /* Transições fluidas */
  --transition-fast: 0.15s ease;
  --transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Alturas de Navegação */
  --header-height: 72px;
  --mobile-nav-height: 68px;
}

/* Reset básico */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tipografia */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 3rem); }
h2 { font-size: clamp(1.5rem, 2.5vw + 0.8rem, 2.2rem); }
h3 { font-size: clamp(1.2rem, 1.8vw + 0.5rem, 1.5rem); }
h4 { font-size: 1.15rem; }

p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-fast);
}
a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container de Layout */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: 860px;
}

/* ==========================================================================
   BANNER DE AVISOS NO TOPO
   ========================================================================== */
.top-announcement {
  background: linear-gradient(90deg, #F9EFE6 0%, #FFFDF8 50%, #F9EFE6 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 16px;
  font-size: 0.88rem;
  color: var(--text-main);
  position: relative;
  z-index: 100;
  transition: var(--transition);
}

.top-announcement.hidden {
  display: none !important;
}

.announcement-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  text-align: center;
  padding-right: 28px;
}

.announcement-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.announcement-link {
  font-weight: 600;
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
}

.announcement-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: var(--radius-xs);
  transition: var(--transition-fast);
}
.announcement-close:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   HEADER DESKTOP & NAVEGAÇÃO SUPERIOR
   ========================================================================== */
.site-header {
  height: var(--header-height);
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 90;
  transition: var(--transition);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo da Marca Cria3D */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}

.logo-cube {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary) 0%, #D89A6E 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(201, 139, 94, 0.28);
  font-size: 1.25rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-title span {
  color: var(--primary);
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Abas de Navegação no Desktop */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-title);
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  min-height: 44px; /* Acessibilidade de toque */
  position: relative;
}

.tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-surface-alt);
}

.tab-btn.active {
  background: var(--primary-light);
  color: var(--primary-hover);
  border-color: var(--primary-light-border);
}

.tab-btn .tab-badge {
  background: var(--primary);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

/* Ações no Header (WhatsApp, Login) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.whatsapp-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #25D366;
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
  transition: var(--transition);
  min-height: 42px;
}
.whatsapp-pill-btn:hover {
  background: #20BD5A;
  color: white;
  transform: translateY(-1px);
}

.account-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  min-height: 42px;
  max-width: 190px;
  white-space: nowrap;
}
.account-pill-btn:hover {
  border-color: var(--border-medium);
  background: var(--bg-surface-elevated);
}

.user-avatar-tiny {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}

.user-avatar-tiny img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

#headerUserNameText {
  max-width: 95px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

/* ==========================================================================
   CONTEÚDO PRINCIPAL DAS ABAS (SPA TABS)
   ========================================================================== */
.main-content {
  flex: 1;
  padding-bottom: 90px; /* Espaço para a barra mobile */
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   BARRA DE NAVEGAÇÃO INFERIOR PARA MOBILE (MOBILE-FIRST TABS)
   ========================================================================== */
.mobile-nav-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mobile-nav-height);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  z-index: 100;
  box-shadow: 0 -4px 16px rgba(59, 50, 38, 0.05);
  padding: 0 8px;
}

.mobile-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100%;
}

.mobile-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 6px 0;
  position: relative;
}

.mobile-tab-btn svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
  transition: var(--transition-fast);
}

.mobile-tab-btn span {
  font-size: 0.68rem;
  font-weight: 600;
  font-family: var(--font-title);
}

.mobile-tab-btn.active {
  color: var(--primary);
}

.mobile-tab-btn.active svg {
  transform: translateY(-2px);
  stroke: var(--primary);
}

.mobile-tab-btn.highlight {
  position: relative;
}

.mobile-tab-btn.highlight .calc-indicator {
  position: absolute;
  top: 4px;
  right: 25%;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
}

/* ==========================================================================
   RODAPÉ DO SITE (CREME E ELEGANTE)
   ========================================================================== */
.site-footer {
  background: var(--bg-surface-warm);
  border-top: 1px solid var(--border-subtle);
  padding: 50px 0 30px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-col h5 {
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 16px;
  font-weight: 700;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-muted);
  cursor: pointer;
}
.footer-links a:hover {
  color: var(--primary);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   BOTÃO FLUTUANTE DE WHATSAPP
   ========================================================================== */
.floating-whatsapp {
  position: fixed;
  bottom: 84px; /* Acima da barra mobile */
  right: 20px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  z-index: 85;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.floating-whatsapp:hover {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.5);
  color: white;
}

.floating-whatsapp svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

/* ==========================================================================
   RESPONSIVIDADE E ADAPTAÇÃO MOBILE-FIRST
   ========================================================================== */
@media (max-width: 900px) {
  .nav-tabs {
    display: none; /* No mobile usamos a barra inferior de abas */
  }

  .mobile-nav-bar {
    display: block;
  }

  .header-actions .whatsapp-pill-btn {
    display: none; /* Deixa o espaço livre no topo do celular */
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .floating-whatsapp {
    bottom: 76px;
    right: 14px;
    width: 50px;
    height: 50px;
  }

  .floating-whatsapp svg {
    width: 28px;
    height: 28px;
  }
}
