/* Search Page - Professional Facebook Marketplace Style */

.gm-search-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.gm-search-header {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gm-search-box {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.gm-search-box input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
}

.gm-search-box input:focus {
  outline: none;
  border-color: #1877f2;
}

.gm-search-box button {
  padding: 12px 24px;
  background: #1877f2;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.gm-search-box button:hover {
  background: #166fe5;
}

.gm-search-filters {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.gm-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gm-filter-group label {
  font-weight: 600;
  color: #65676b;
  font-size: 14px;
}

.gm-filter-group select {
  padding: 8px 12px;
  border: 1px solid #ccd0d5;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  min-width: 150px;
}

.gm-price-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gm-price-range input {
  width: 80px;
  padding: 8px 12px;
  border: 1px solid #ccd0d5;
  border-radius: 6px;
  font-size: 14px;
}

.gm-price-range span {
  color: #65676b;
  font-weight: 500;
}

.gm-btn-secondary {
  padding: 8px 16px;
  background: #e4e6eb;
  color: #050505;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.gm-btn-secondary:hover {
  background: #d8dadf;
}

.gm-search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  min-height: 200px;
}

.gm-load-more {
  text-align: center;
  margin-top: 30px;
}

.gm-btn-primary {
  padding: 12px 24px;
  background: #1877f2;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.gm-btn-primary:hover:not(:disabled) {
  background: #166fe5;
}

.gm-btn-primary:disabled {
  background: #8a8d91;
  cursor: not-allowed;
}

/* Loading skeletons */
.gm-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 8px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Responsive design */
@media (max-width: 768px) {
  .gm-search-page {
    padding: 12px;
  }
  
  .gm-search-header {
    padding: 16px;
  }
  
  .gm-search-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .gm-filter-group {
    justify-content: space-between;
  }
  
  .gm-search-results {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .gm-search-box {
    flex-direction: column;
  }
  
  .gm-search-box button {
    width: 100%;
  }
  
  .gm-search-results {
    grid-template-columns: 1fr;
  }
}
