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

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: transparent;
  font-family: 'Poppins', sans-serif;
}

.catalogo-container {
  width: 100%;
  padding: 20px 40px;
  max-width: 100%;
}

/* Toggle de Filtros */
.filtros-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.btn-toggle-filtros {
  padding: 10px 20px;
  background: #DD5E56;
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-toggle-filtros:hover {
  background: #c54d45;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(221,94,86,0.3);
}

.filtro-sort-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filtro-sort-inline label {
  font-size: 14px;
  font-weight: 600;
  color: #666;
}

.filtro-sort-inline select {
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  background: white;
  cursor: pointer;
  font-weight: 500;
}

.filtro-results-inline {
  padding: 8px 16px;
  background: #f3f4f6;
  border-radius: 8px;
  font-weight: 600;
  color: #DD5E56;
  font-size: 14px;
}

/* Filtros Colapsables */
.filtros-container {
  background: linear-gradient(135deg, #fff 0%, #f9fafb 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border: 1px solid #e5e7eb;
}

.filtro-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filtro-label {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filtro-values {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: #DD5E56;
}

.filtro-values span:nth-child(2) {
  color: #9ca3af;
  font-weight: 400;
}

/* Dual Range Slider */
.dual-range-wrapper {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
}

.dual-range-wrapper input[type="range"] {
  position: absolute;
  width: 100%;
  height: 6px;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.dual-range-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 3px solid #DD5E56;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 8px rgba(221,94,86,0.3);
  transition: all 0.2s ease;
}

.dual-range-wrapper input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(221,94,86,0.5);
}

.dual-range-wrapper input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 3px solid #DD5E56;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 8px rgba(221,94,86,0.3);
  transition: all 0.2s ease;
}

.dual-range-wrapper input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(221,94,86,0.5);
}

/* Track styling */
.dual-range-wrapper::before {
  content: '';
  position: absolute;
  height: 6px;
  width: 100%;
  background: #e5e7eb;
  border-radius: 3px;
  z-index: 0;
}

.dual-range-wrapper input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: linear-gradient(to right, 
    #e5e7eb 0%, 
    #e5e7eb var(--min-percent), 
    #DD5E56 var(--min-percent), 
    #DD5E56 var(--max-percent), 
    #e5e7eb var(--max-percent), 
    #e5e7eb 100%);
  border-radius: 3px;
}

.dual-range-wrapper input[type="range"]::-moz-range-track {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
}

@media (max-width: 900px) {
  .filtros-toggle {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filtros-container {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }
}

.catalogo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.catalogo-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0px 20px rgba(0,0,0,0.30);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.catalogo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

.card-image {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

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

.catalogo-card:hover .card-image img {
  transform: scale(1.08);
}

.card-status {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #65DA55;
  color: #0b3d0b;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.card-content {
  padding: 20px;
}

.card-content h3 {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}

.card-location {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 4px;
}

.card-dimensions {
  font-size: 0.875rem;
  color: #9ca3af;
  margin-bottom: 12px;
}

.card-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: #DD5E56;
}

/* Pagination */
.catalogo-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
}

.catalogo-pagination button {
  padding: 10px 16px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  transition: all 0.2s ease;
}

.catalogo-pagination button:hover:not(:disabled) {
  background: #DD5E56;
  color: white;
  border-color: #DD5E56;
}

.catalogo-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.catalogo-pagination button.active {
  background: #DD5E56;
  color: white;
  border-color: #DD5E56;
}

.catalogo-pagination span {
  padding: 10px;
  color: #9ca3af;
}

/* Loading */
.catalogo-loading {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 20px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #DD5E56;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

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

.catalogo-loading p {
  color: #6b7280;
  font-weight: 600;
}

/* Empty State */
.catalogo-empty {
  text-align: center;
  padding: 80px 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.catalogo-empty h3 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #111827;
}

.catalogo-empty p {
  color: #6b7280;
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .catalogo-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .catalogo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .catalogo-container {
    padding: 20px;
  }
  
  .catalogo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .catalogo-pagination {
    flex-wrap: wrap;
  }
}
