/* ═══════════════════════════════════════════════════════
   MAQUISOLO DESIGN SYSTEM v2.0
   Industrial Modern + Agritech Premium
   ═══════════════════════════════════════════════════════ */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── iOS / Mobile Fixes ─── */
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* iOS safe area support */
@supports (padding: env(safe-area-inset-bottom)) {
  body { padding-bottom: env(safe-area-inset-bottom); }
}

/* ─── PAGE TRANSITIONS ─── */
#page-content {
  transition: opacity 0.15s ease, transform 0.15s ease;
}

/* ─── BOTTOM NAV SPACING ─── */
@media(max-width:1023px) {
  .footer { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
}

/* ─── CSS TOKENS ─── */
:root {
  /* Colors */
  --red: #C41A1A;
  --red-dark: #9E1515;
  --red-light: #E84848;
  --red-glow: rgba(196, 26, 26, 0.15);
  --black: #0A0A0A;
  --dark: #111111;
  --gray-900: #1A1A1A;
  --gray-800: #2D2D2D;
  --gray-700: #404040;
  --gray-600: #666666;
  --gray-400: #999999;
  --gray-300: #CCCCCC;
  --gray-200: #E2E8F0;
  --gray-100: #F1F5F9;
  --gray-50: #F8FAFC;
  --white: #FFFFFF;
  --surface: #FFFFFF;
  --bg: #FAFAFA;
  --green-whatsapp: #25D366;

  /* Typography */
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.16);
  --shadow-red: 0 4px 24px rgba(196, 26, 26, 0.3);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration: 0.4s;

  /* Layout */
  --max-width: 1280px;
  --header-height-mobile: calc(64px + env(safe-area-inset-top, 0px));
  --header-height-desktop: 72px;
}

/* ─── RESET ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-main);
  color: var(--dark);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ─── UTILITIES ─── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 640px) {
  .container { padding: 0 var(--space-xl); }
}

.label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  font-family: var(--font-mono);
}

.section {
  padding: var(--space-3xl) 0;
}

@media (min-width: 1024px) {
  .section { padding: var(--space-4xl) 0; }
}

.section-header {
  margin-bottom: var(--space-2xl);
}

@media (min-width: 1024px) {
  .section-header { margin-bottom: var(--space-3xl); }
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: var(--space-sm);
}

.section-desc {
  color: var(--gray-600);
  font-size: 1rem;
  max-width: 480px;
  margin: var(--space-sm) auto 0;
  line-height: 1.7;
}

/* Visually Hidden (accessibility) */
.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;
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -10%); }
  30% { transform: translate(3%, -15%); }
  50% { transform: translate(12%, 9%); }
  70% { transform: translate(9%, 4%); }
  90% { transform: translate(-1%, 7%); }
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.anim-fade-up {
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) forwards;
}

.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.3s; }
.anim-delay-4 { animation-delay: 0.4s; }
.anim-delay-5 { animation-delay: 0.5s; }
.anim-delay-6 { animation-delay: 0.6s; }

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--red);
  color: white;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s var(--ease-out);
  box-shadow: var(--shadow-red);
}

.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(196, 26, 26, 0.4);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: transparent;
  color: white;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid rgba(255,255,255,0.25);
  transition: all 0.3s var(--ease-out);
}

.btn-outline:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid var(--gray-200);
  color: var(--dark);
  transition: all 0.3s var(--ease-out);
  background: var(--white);
}

.btn-secondary:hover {
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ─── LOADING ─── */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  width: 100%;
}

/* ─── PLACEHOLDER ─── */
.placeholder-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
  color: var(--gray-400);
  font-size: 2rem;
}

/* ═══════════════════════════════════════════
   CENTERING — Mobile & Tablet (< 1024px)
   Regra: conteúdo centralizado em telas menores
   ═══════════════════════════════════════════ */

/* Section headers always centered */
.section-header { text-align: center; }

/* Hero content centered on all screens */
.hero-content { text-align: center; }
.hero-actions { justify-content: center; }
.hero-stats { justify-content: center; }

/* Page hero centered */
.page-hero .container { text-align: center; }

/* Service cards centered */
.service-card { text-align: center; align-items: center; }

/* CTA section centered */
.cta-inner { text-align: center; align-items: center; }

/* About section — center on mobile/tablet */
@media (max-width: 1023px) {
  .about-text { text-align: center; }
  .about-highlights { justify-content: center; }
  .about-highlight { justify-content: center; text-align: left; }
  .products-more { text-align: center; }
}

/* Products grid centered items on mobile */
@media (max-width: 639px) {
  .products-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    max-width: 400px;
    margin: 0 auto;
  }
}

/* ═══════════════════════════════════════════
   SERVICE ICON BOX — Professional icon container
   Replaces emoji icons with SVG in styled boxes
   ═══════════════════════════════════════════ */

.service-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--red-glow, rgba(196, 26, 26, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  color: var(--red);
  transition: all 0.3s var(--ease-out);
}

.service-card:hover .service-icon-box {
  background: var(--red);
  color: white;
  transform: scale(1.05);
}

/* Old .service-icon emoji style — hidden/overridden */
.service-icon { display: none; }

/* ─── Product meta icons alignment ─── */
.product-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.product-meta-item svg {
  color: var(--gray-400);
  flex-shrink: 0;
}

/* ─── Badge featured icon ─── */
.badge-featured {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F59E0B;
}

.badge-featured svg { width: 14px; height: 14px; }

/* ─── Product card link ─── */
.product-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* ─── PD badges with icons ─── */
.pd-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pd-badge svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}
