/* ===================================
   MERCANET - OBJETOS PERDIDOS
   Estilo moderno y consistente
   =================================== */

:root {
  --primary: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --lost-color: #dc2626;
  --lost-light: #fef2f2;
  --found-color: #059669;
  --found-light: #ecfdf5;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  z-index: 1000;
  transition: box-shadow 0.2s;
}

.header.scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
}

.logo-text {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--primary);
}

.search-box {
  flex: 1;
  max-width: 500px;
  display: flex;
  align-items: center;
  background: var(--gray-100);
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  padding: 0 8px 0 18px;
  height: 46px;
  transition: all 0.2s;
}

.search-box:focus-within {
  background: var(--white);
  border-color: var(--lost-color);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.search-box i {
  color: var(--gray-400);
  margin-right: 12px;
}

.search-box input {
  flex: 1;
  border: none;
  background: none;
  font-size: 0.9375rem;
  outline: none;
}

.search-box button {
  padding: 8px 18px;
  background: var(--lost-color);
  color: var(--white);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
}

.search-box button:hover {
  background: #b91c1c;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.nav-links a:hover {
  background: rgba(30, 64, 175, 0.08);
  color: var(--primary);
}

.nav-links a.active {
  background: rgba(220, 38, 38, 0.1);
  color: var(--lost-color);
}

.nav-links .sell-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--white) !important;
}

.user-area {
  margin-left: auto;
}

.login-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: var(--radius-full);
  transition: background 0.2s;
}

.user-btn:hover {
  background: var(--gray-100);
}

.avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.user-btn span {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--gray-700);
}

/* ===== MAIN ===== */
.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--lost-color), #991b1b);
  margin: 0 -24px 32px;
  padding: 40px 24px;
  color: var(--white);
}

.page-header-content {
  max-width: 1400px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.header-text h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-text p {
  font-size: 1rem;
  opacity: 0.9;
}

.btn-publish {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--white);
  color: var(--lost-color);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-publish:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Header Stats */
.header-stats {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-card i {
  font-size: 1.5rem;
  opacity: 0.9;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  display: block;
}

.stat-label {
  font-size: 0.8125rem;
  opacity: 0.85;
}

.stat-card.stat-lost {
  background: rgba(255, 255, 255, 0.2);
}

.stat-card.stat-found {
  background: rgba(5, 150, 105, 0.3);
}

/* Content Wrapper */
.content-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

/* ===== FILTERS SIDEBAR ===== */
.filters-sidebar {
  position: sticky;
  top: 100px;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.filters-header h3 {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-800);
}

.filters-header h3 i {
  color: var(--lost-color);
}

.close-filters {
  display: none;
  width: 36px;
  height: 36px;
  background: var(--gray-100);
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
}

.filters-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 24px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label i {
  color: var(--lost-color);
  font-size: 0.75rem;
}

.filter-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-select:focus {
  outline: none;
  border-color: var(--lost-color);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.clear-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  color: var(--danger);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.clear-filters:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Sidebar CTA */
.sidebar-cta {
  padding: 20px;
  background: var(--lost-light);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.cta-icon {
  width: 48px;
  height: 48px;
  background: var(--lost-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  margin: 0 auto 12px;
}

.sidebar-cta h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 8px;
}

.sidebar-cta p {
  font-size: 0.8125rem;
  color: var(--gray-600);
  margin-bottom: 16px;
  line-height: 1.5;
}

.btn-cta {
  width: 100%;
  padding: 12px 20px;
  background: var(--lost-color);
  color: var(--white);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-cta:hover {
  background: #b91c1c;
}

/* ===== OBJECTS SECTION ===== */
.objects-section {
  min-width: 0;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.results-info h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.results-info h2 i {
  color: var(--lost-color);
}

.results-count {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-filters-mobile {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
}

/* ===== OBJECTS GRID ===== */
.objects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* Object Card */
.object-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.25s;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
}

.object-card.visible {
  opacity: 1;
  transform: translateY(0);
  animation: fadeInUp 0.5s ease forwards;
}

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

.object-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.object-card.lost {
  border-top: 4px solid var(--lost-color);
}

.object-card.found {
  border-top: 4px solid var(--found-color);
}

.card-link {
  display: block;
}

.card-image {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--gray-100);
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.object-card:hover .card-image img {
  transform: scale(1.05);
}

.status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-badge.lost {
  background: var(--lost-color);
  color: var(--white);
}

.status-badge.found {
  background: var(--found-color);
  color: var(--white);
}

.card-content {
  padding: 20px;
}

.card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.card-location {
  font-size: 0.8125rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.card-location i {
  color: var(--lost-color);
  font-size: 0.75rem;
}

.card-description {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 14px;
  line-height: 1.6;
}

.card-meta {
  margin-bottom: 16px;
}

.meta-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--gray-400);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}

.card-publisher {
  display: flex;
  align-items: center;
  gap: 10px;
}

.publisher-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.publisher-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-600);
}

.card-action {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--lost-color);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}

.object-card:hover .card-action {
  gap: 10px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 24px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.empty-icon {
  width: 80px;
  height: 80px;
  background: var(--lost-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.empty-icon i {
  font-size: 2rem;
  color: var(--lost-color);
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.9375rem;
  color: var(--gray-500);
  margin-bottom: 24px;
}

.empty-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--lost-color);
  color: var(--white);
}

.btn-primary:hover {
  background: #b91c1c;
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--gray-900);
  color: var(--white);
  padding: 48px 24px 24px;
  margin-top: 48px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer-logo {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-logo i {
  color: var(--accent);
}

.footer-brand p {
  color: var(--gray-400);
  font-size: 0.9375rem;
}

.footer-links h4 {
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer-links a {
  display: block;
  color: var(--gray-400);
  margin-bottom: 10px;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: 1400px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--gray-700);
  text-align: center;
  color: var(--gray-500);
  font-size: 0.875rem;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.625rem;
  color: var(--gray-400);
  padding: 8px 12px;
}

.bottom-nav a i {
  font-size: 1.25rem;
}

.bottom-nav a.active {
  color: var(--lost-color);
}

.bottom-nav .report {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--lost-color), #991b1b);
  color: var(--white) !important;
  border-radius: 50%;
  margin-top: -25px;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
  justify-content: center;
}

.bottom-nav .report span {
  display: none;
}

/* ===== FILTER OVERLAY ===== */
.filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.filter-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .filters-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    border-radius: 0;
    z-index: 1060;
    transform: translateX(-100%);
    transition: transform 0.3s;
    overflow-y: auto;
  }

  .filters-sidebar.active {
    transform: translateX(0);
  }

  .close-filters {
    display: flex;
  }

  .btn-filters-mobile {
    display: flex;
  }

  .header-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .logo-text {
    display: none;
  }

  .search-box {
    order: 3;
    width: 100%;
    max-width: none;
  }

  .nav-links {
    display: none;
  }

  .main {
    padding: 0 16px 90px;
  }

  .page-header {
    margin: 0 -16px 24px;
    padding: 28px 16px;
  }

  .page-header-content {
    flex-direction: column;
    text-align: center;
  }

  .header-text h1 {
    font-size: 1.5rem;
    justify-content: center;
  }

  .btn-publish {
    width: 100%;
    justify-content: center;
  }

  .header-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .objects-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card-content {
    padding: 16px;
  }

  .card-title {
    font-size: 1rem;
  }

  .footer {
    display: none;
  }

  .bottom-nav {
    display: flex;
  }
}

@media (max-width: 480px) {
  .card-description {
    display: none;
  }

  .card-publisher {
    display: none;
  }

  .empty-state {
    padding: 40px 20px;
  }

  .empty-actions {
    flex-direction: column;
  }

  .empty-actions .btn {
    width: 100%;
    justify-content: center;
  }
}