/* Reset CSS - Consistency Across Browsers */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif, sans-serif;
  background-color: #ffffff;
  color: #111111;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Color Variables */
:root {
  --color-bg: #ffffff;
  --color-text: #111111;
  --color-gray-light: #f5f5f5;
  --color-blue: #007aff;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #111111;
    --color-text: #f5f5f5;
    --color-gray-light: #222222;
    --color-blue: #0a84ff;
  }
  body {
    background-color: var(--color-bg);
    color: var(--color-text);
  }
  header {
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-gray-light);
  }
}

/* Responsive Fixed Top Menu */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-gray-light);
  z-index: 999;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
}

header.scrolled {
  background-color: var(--color-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Navigation Menu */
nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s ease;
}

nav a:hover,
nav a:focus {
  color: var(--color-blue);
  outline: none;
}

/* Hero Section */
.hero {
  height: 100vh;
  background-color: var(--color-gray-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 1.5rem;
  transition: background-color 0.3s ease;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1rem;
  max-width: 900px;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-text);
  max-width: 600px;
  line-height: 1.5;
}

/* Responsive Breakpoints for Hero */
@media (max-width: 1024px) {
  .hero {
    padding: 0 2rem;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: clamp(2rem, 6vw, 3rem);
  }
  .hero p {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
  }
}

/* Grid Symmetry and Pixel-Perfect Alignment */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Fade-in Animation on Scroll */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Floating Buttons Container */
.floating-buttons {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 1000;
}

/* Floating Buttons Base Style */
.floating-button {
  width: 48px;
  height: 48px;
  background-color: var(--color-blue);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
  position: relative;
  overflow: visible;
}

/* Pulse Animation */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 122, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 122, 255, 0);
  }
}

.floating-button.pulse {
  animation: pulse 2.5s infinite;
}

.floating-button:hover,
.floating-button:focus {
  box-shadow: 0 0 15px 3px var(--color-blue);
  outline: none;
}

/* Instagram Button Specific */
.floating-button.instagram {
  background-color: #E1306C;
  box-shadow: 0 4px 12px rgba(225, 48, 108, 0.6);
}

.floating-button.instagram.pulse {
  animation: pulse 2.5s infinite;
  box-shadow: 0 0 0 0 rgba(225, 48, 108, 0.7);
}

.floating-button.instagram:hover,
.floating-button.instagram:focus {
  box-shadow: 0 0 15px 3px #E1306C;
}

/* WhatsApp Button Specific */
.floating-button.whatsapp {
  background-color: #25D366;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.6);
}

.floating-button.whatsapp.pulse {
  animation: pulse 2.5s infinite;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
}

.floating-button.whatsapp:hover,
.floating-button.whatsapp:focus {
  box-shadow: 0 0 15px 3px #25D366;
}

/* Accessibility Focus */
.floating-button:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

/* === Compat: header class + element (JS usa .header) === */
.header, header.header { 
  position: fixed; top: 0; left: 0; width: 100%; z-index: 999;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-gray-light);
  padding: 1rem 2rem;
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--color-text); text-decoration: none; }
.brand img { display: block; }

/* === Nav core === */
.nav { display: flex; gap: 1.25rem; }
.nav a { text-decoration: none; color: var(--color-text); font-weight: 600; padding: 10px 12px; border-radius: 10px; }
.nav a:hover, .nav a:focus { color: var(--color-blue); outline: none; }

/* === Mobile toggle & overlay menu === */
.nav-toggle { display: none; }
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--color-gray-light); border: 1px solid var(--color-gray-light); color: var(--color-text);
  }
  .nav {
    display: none;
    position: absolute; right: 16px; top: 72px;
    background: color-mix(in srgb, var(--color-bg) 96%, transparent);
    border: 1px solid var(--color-gray-light);
    border-radius: 14px; padding: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18);
    flex-direction: column; gap: 8px; width: min(90vw, 280px);
  }
  .header.open .nav { display: flex; }
  .header .btn--wa { display: none; } /* CTA principal volta na hero no mobile */
}
body.no-scroll { overflow: hidden; }

/* === Buttons (base) === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
       padding: 12px 16px; min-height: 44px; border-radius: 12px; border: 1px solid var(--color-gray-light);
       text-decoration: none; font-weight: 600; color: var(--color-text);
       transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.12); }
.btn:focus-visible { outline: 2px solid var(--color-blue); outline-offset: 2px; }
.btn--primary { background: var(--color-blue); color: #fff; border-color: transparent; }
.btn--ghost { background: transparent; }
.btn--wa { background: #1b1f2a; color: #fff; }

/* === WhatsApp pulse leve (classe controlada via JS: .is-pulsing) === */
@keyframes wa-pulse { 0%{ transform: translateY(0) scale(1);} 60%{ transform: translateY(-2px) scale(1.03);} 100%{ transform: translateY(0) scale(1);} }
.btn--wa.is-pulsing { animation: wa-pulse .9s ease; }

/* === Reveal / Fade (sincroniza com main.js) === */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: none; }
.section-fade { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; will-change: opacity, transform; }
.section-fade.is-visible { opacity: 1; transform: none; }
.stagger > * { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.stagger.is-visible > * { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .section-fade, .stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* === Lightbox dialog (#lb) === */
dialog.lightbox { border: 0; padding: 0; background: transparent; }
dialog.lightbox::backdrop { background: rgba(0,0,0,.7); }
dialog.lightbox img { max-width: min(92vw, 1200px); max-height: 86vh; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog.lightbox #lb-close {
  position: fixed; top: 16px; right: 16px;
  background: #1b1f2a; color: var(--color-text);
  border: 1px solid var(--color-gray-light); border-radius: 12px;
  min-width: 44px; min-height: 44px; font-size: 22px; line-height: 1;
}

/* ===== Utilities & Layout ===== */
.section { padding: clamp(40px, 6vw, 96px) 0; }
.section--alt { background: var(--color-gray-light); }
.center { text-align: center; }
.grid { display: grid; gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; }
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
}

/* Adjust body content to account for fixed header height */
main, .page, .with-fixed-header { padding-top: 80px; }

/* ===== Hero variants ===== */
.hero--avaliacoes {
  min-height: 56vh;
  display: flex; align-items: center;
  text-align: center;
  background: var(--color-gray-light);
}
.hero .container, .hero--avaliacoes .container { max-width: 900px; }

/* ===== Cards / Testimonials ===== */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-gray-light);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,.04);
}
.testimonial p { color: var(--color-text); line-height: 1.6; }
.testimonials { align-items: stretch; }
.testimonials .testimonial { display: grid; gap: 10px; }

/* ===== Rating badge (5.0 Google) ===== */
.rating-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--color-gray-light);
  background: #fff0;
  margin: 12px 0 8px;
}
.rating-badge .muted { opacity: .7; }

/* ===== Acessórios ===== */
.categorias ul { list-style: none; display: grid; gap: 10px; margin-top: 8px; }
.vitrine h2 { margin-bottom: 8px; }
.produto { display: grid; gap: 10px; }
.produto img {
  width: 100%; height: auto; display: block;
  border-radius: 12px; background: var(--color-gray-light);
  aspect-ratio: 4/3; object-fit: cover;
}
.cta-final { text-align: center; padding: clamp(40px, 6vw, 96px) 0; }

/* ===== Contato ===== */
.contact { display: grid; gap: 24px; }
.contact .grid-2 { align-items: start; }
.contact form { display: grid; gap: 12px; }
.contact input, .contact textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--color-gray-light);
  background: var(--color-bg); color: var(--color-text);
}
.contact textarea { min-height: 140px; resize: vertical; }
.map iframe { width: 100%; height: 360px; border: 0; border-radius: 16px; }

/* ===== Footer / Info ===== */
.info { background: var(--color-gray-light); padding: 12px 0; }
.info .container { display: flex; align-items: center; justify-content: center; }
.info small, .info p { opacity: .8; }

/* ===== Accessibility tweaks ===== */
:focus-visible { outline: 2px solid var(--color-blue); outline-offset: 2px; }
@media (prefers-color-scheme: dark) {
  .section--alt, .hero--avaliacoes { background: #0f0f10; }
  .card { border-color: #1e1e1f; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
  .info { background: #0f0f10; }
}


/* ===== Language Selector ===== */
.language-selector {
    position: fixed; /* Sempre visível */
    top: 20px;
    right: 20px;
    z-index: 1000;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.language-selector select {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    cursor: pointer;
    appearance: none;
    transition: all 0.25s ease;
}

/* Hover e Focus */
.language-selector select:hover,
.language-selector select:focus {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

/* Modo escuro automático */
@media (prefers-color-scheme: dark) {
    .language-selector select {
        background: rgba(30, 30, 30, 0.9);
        color: #fff;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
}

/* Animação fade-in */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}