@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-dark: #0a0f18;
  --bg-panel: rgba(20, 28, 43, 0.6);
  --bg-glass: rgba(15, 23, 42, 0.4);
  
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.3);
  
  --secondary: #0ea5e9;
  
  --tag-venda: #10b981;
  --tag-aluguel: #3b82f6;
  --tag-servico: #8b5cf6;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --border-light: rgba(255, 255, 255, 0.08);
  
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans); background-color: var(--bg-dark);
  color: var(--text-main); line-height: 1.6; min-height: 100vh; overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

/* Navbar Superior */
header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  background: rgba(10, 15, 24, 0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.top-bar {
  display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem;
  gap: 2rem;
}

.logo { display: flex; align-items: center; gap: 0.5rem; font-size: 1.5rem; font-weight: 800; color: var(--text-main); }
.logo span { color: var(--primary); }

/* Barra de Busca */
.search-bar {
  flex: 1; max-width: 600px; display: flex; align-items: center;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-light);
  border-radius: 99px; overflow: hidden;
}
.search-bar input {
  flex: 1; background: transparent; border: none; padding: 0.8rem 1.5rem;
  color: var(--text-main); outline: none; font-size: 1rem;
}
.search-bar .search-btn {
  background: transparent; border: none; padding: 0 1.5rem; color: var(--text-muted);
  cursor: pointer; transition: color 0.2s; display: flex; align-items: center;
}
.search-bar .search-btn:hover { color: var(--primary); }

.nav-menu { display: flex; align-items: center; justify-content: flex-end; gap: 2rem; flex: 1; }
.mobile-menu-btn { display: none; background: transparent; border: none; color: var(--text-main); font-size: 1.8rem; cursor: pointer; padding: 0.5rem; }

.nav-actions { display: flex; align-items: center; gap: 1rem; }
.user-greeting { color: var(--text-muted); font-size: 0.9rem; }

/* Categoria Nav */
.category-nav { border-top: 1px solid var(--border-light); background: rgba(0,0,0,0.2); }
.cat-links { display: flex; gap: 2rem; overflow-x: auto; padding: 0.8rem 1.5rem; white-space: nowrap; scrollbar-width: none; }
.cat-links::-webkit-scrollbar { display: none; }
.cat-link { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; display: flex; align-items: center; gap: 0.5rem; padding-bottom: 0.2rem; border-bottom: 2px solid transparent;}
.cat-link:hover, .cat-link.active { color: var(--text-main); border-bottom-color: var(--primary); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.6rem 1.2rem; border-radius: 99px; font-weight: 600; cursor: pointer;
  transition: all 0.3s; border: none; gap: 0.5rem; font-size: 0.9rem;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; box-shadow: 0 4px 15px var(--primary-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px var(--primary-glow); }
.btn-outline { background: transparent; color: var(--text-main); border: 1px solid var(--border-light); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.05); }

/* Hero */
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero-content h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1.5rem; line-height: 1.1; }
.hero-content h1 span { color: var(--primary); }
.hero-content p { color: var(--text-muted); margin-bottom: 2rem; font-size: 1.1rem; }
.hero-actions { display: flex; gap: 1rem; }
.glass-panel { background: var(--bg-glass); backdrop-filter: blur(16px); border: 1px solid var(--border-light); }

/* Filtros */
.filters { display: flex; gap: 1rem; margin-top: 1rem; }
.filter-pill {
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-light); color: var(--text-muted);
  padding: 0.4rem 1rem; border-radius: 99px; cursor: pointer; transition: all 0.2s;
}
.filter-pill.active, .filter-pill:hover { background: rgba(255,255,255,0.1); color: var(--text-main); border-color: var(--text-muted); }

/* Marketplace Grid */
.animal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.animal-card { background: var(--bg-panel); border: 1px solid var(--border-light); border-radius: 1rem; overflow: hidden; transition: all 0.3s ease; display: flex; flex-direction: column;}
.animal-card:hover { border-color: var(--secondary); transform: translateY(-3px); }

/* Header do Card (Tag de Transação) */
.card-header { padding: 1rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.05); }
.tag { font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 4px; text-transform: uppercase; }
.tag.venda { background: rgba(16, 185, 129, 0.15); color: var(--tag-venda); }
.tag.aluguel { background: rgba(59, 130, 246, 0.15); color: var(--tag-aluguel); }
.tag.servico { background: rgba(139, 92, 246, 0.15); color: var(--tag-servico); }
.cat-icon { font-size: 1.2rem; }

.animal-content { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.animal-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.animal-price { font-size: 1.4rem; color: var(--primary); font-weight: 700; margin-bottom: 1rem; }
.animal-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.3rem;}
.metadata-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 1rem; background: rgba(0,0,0,0.2); padding: 0.8rem; border-radius: 0.5rem; }
.meta-item { font-size: 0.8rem; color: var(--text-muted); }
.meta-item strong { color: var(--text-main); display: block; }

/* Vendedor Info */
.seller-info { margin-top: auto; display: flex; align-items: center; gap: 0.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.05); cursor: pointer;}
.seller-info:hover .seller-name { color: var(--primary); text-decoration: underline; }
.seller-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--secondary); display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 0.8rem;}
.seller-name { font-size: 0.85rem; color: var(--text-muted); flex:1;}
.seller-rep { font-size: 0.8rem; color: #fbbf24; font-weight: bold; display: flex; align-items: center; gap: 0.2rem;}

/* Modal */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); backdrop-filter: blur(5px); }
.modal-content { background-color: var(--bg-dark); margin: 5% auto; padding: 2rem; border: 1px solid var(--border-light); width: 90%; max-width: 600px; border-radius: 1rem; position: relative; }
.close-modal { color: #aaa; position: absolute; top: 1rem; right: 1.5rem; font-size: 28px; font-weight: bold; cursor: pointer; }
.close-modal:hover { color: white; }
.modal-user-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.modal-user-avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: bold; }

footer { padding: 3rem 0; border-top: 1px solid var(--border-light); margin-top: 4rem;}

/* Responsividade Mobile */
@media (max-width: 768px) {
  .top-bar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
  }
  .mobile-menu-btn {
    display: block;
  }
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
    gap: 1rem;
  }
  .nav-menu.open {
    display: flex;
  }
  
  .search-bar {
    width: 100%;
    max-width: 100%;
  }
  .nav-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }
  .nav-actions .btn {
    width: 100%;
  }
  
  .category-nav {
    display: none;
    border-top: none;
    background: transparent;
  }
  .category-nav.open {
    display: block;
    margin-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
  }
  .cat-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 0 1rem;
    overflow-x: visible;
    white-space: normal;
  }
  
  .hero.container {
    padding-top: 200px !important; 
    padding-bottom: 2rem !important;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .hero-content h1 {
    font-size: 2.2rem;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .hero-visual img {
    height: 200px !important;
  }
  
  .cat-links {
    padding: 0.8rem 1rem;
  }
  
  .form-container, .auth-container {
    margin-top: 180px !important;
    padding: 1.5rem;
    width: 95%;
  }
  .form-row {
    grid-template-columns: 1fr !important;
  }
  
  .product-container {
    margin-top: 180px !important;
  }
}
