/**
 * Catalog & Public-Facing Styles
 * Phase 3A: Modern, mobile-responsive catalog browsing UI
 */

/* Base Catalog Body */
.catalog-body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Navigation */
.catalog-nav {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand h1 {
  margin: 0;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: #667eea;
}

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.nav-mobile-toggle span {
  width: 25px;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: 0.3s;
}

/* Main Content */
.catalog-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Search Section */
.search-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.search-section h2 {
  margin: 0 0 1.5rem;
  color: #333;
}

.search-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-bar input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.search-bar input:focus {
  outline: none;
  border-color: #667eea;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.filters select,
.filters input {
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.95rem;
}

.filters select:focus,
.filters input:focus {
  outline: none;
  border-color: #667eea;
}

/* Auctions Grid */
.auctions-section,
.lots-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.auctions-section h3,
.lots-section h3 {
  margin: 0 0 1.5rem;
  color: #333;
}

.auctions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.auction-card {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}

.auction-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.auction-card h4 {
  margin: 0 0 0.5rem;
  color: #333;
}

.auction-card .auction-meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.auction-card .auction-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.auction-status.upcoming {
  background: #e3f2fd;
  color: #1976d2;
}

.auction-status.live {
  background: #ffebee;
  color: #c62828;
  animation: pulse 2s infinite;
}

/* Lots Grid */
.lots-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.lots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.lot-card {
  background: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.lot-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

.lot-card .lot-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 3rem;
}

.lot-card .lot-info {
  padding: 1rem;
}

.lot-card .lot-number {
  font-size: 0.85rem;
  color: #666;
  font-weight: 600;
}

.lot-card h5 {
  margin: 0.5rem 0;
  color: #333;
}

.lot-card .lot-estimate {
  font-size: 0.9rem;
  color: #667eea;
  font-weight: 600;
}

.lot-card .lot-bid-info {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5rem;
}

/* Lot Detail Modal */
.lot-detail {
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
}

.lot-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1.5rem;
}

.lot-detail-images {
  margin-bottom: 1.5rem;
}

.lot-detail-images img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.lot-detail-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 8px;
}

.lot-detail-info .info-item {
  display: flex;
  flex-direction: column;
}

.lot-detail-info .info-label {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.25rem;
}

.lot-detail-info .info-value {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}

.lot-detail-description {
  line-height: 1.6;
  color: #555;
}

/* Register Page */
.register-main {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.register-container {
  width: 100%;
  max-width: 600px;
}

.register-card {
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.register-card h2 {
  margin: 0 0 0.5rem;
  color: #333;
}

.register-card .subtitle {
  color: #666;
  margin: 0 0 2rem;
}

.register-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  color: #999;
  font-size: 0.85rem;
}

.form-divider {
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e0e0e0;
}

.form-divider span {
  color: #666;
  font-weight: 600;
}

.checkbox-group {
  display: flex;
  align-items: start;
  gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
}

.checkbox-group label {
  margin: 0;
  font-weight: normal;
}

.btn-block {
  width: 100%;
}

.login-link {
  text-align: center;
  margin-top: 1.5rem;
  color: #666;
}

.login-link a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.success-message {
  background: #e8f5e9;
  border: 2px solid #4caf50;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.success-message h3 {
  color: #2e7d32;
  margin: 0 0 0.5rem;
}

.success-message p {
  color: #555;
  margin: 0;
}

/* Verify Email Page */
.verify-main {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.verify-container {
  width: 100%;
  max-width: 500px;
}

.verify-card {
  background: white;
  border-radius: 12px;
  padding: 3rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  text-align: center;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.verify-success {
  color: #4caf50;
}

.verify-success h2 {
  margin: 0 0 1rem;
}

.verify-error {
  color: #f44336;
}

.verify-error h2 {
  margin: 0 0 1rem;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #666;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
}

.modal-close:hover {
  color: #333;
}

/* Footer */
.catalog-footer {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

.catalog-footer p {
  margin: 0.5rem 0;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #667eea;
  color: white;
}

/* Animations */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-mobile-toggle {
    display: flex;
  }

  .catalog-main {
    padding: 1rem;
  }

  .search-section,
  .auctions-section,
  .lots-section {
    padding: 1.5rem;
  }

  .search-bar {
    flex-direction: column;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .auctions-grid,
  .lots-grid {
    grid-template-columns: 1fr;
  }

  .register-form .form-row {
    grid-template-columns: 1fr;
  }

  .register-card {
    padding: 1.5rem;
  }

  .lot-detail-info {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 1.5rem;
  }
}

/* Mobile-responsive improvements for live bidding (Phase 2 enhancement) */
@media (max-width: 768px) {
  .bidder-body {
    font-size: 14px;
  }

  .lot-hero {
    padding: 1.5rem;
  }

  .lot-title {
    font-size: 1.5rem;
  }

  .current-bid {
    font-size: 2rem;
  }

  .bid-controls {
    flex-direction: column;
    gap: 0.75rem;
  }

  .quick-bids {
    grid-template-columns: repeat(2, 1fr);
  }

  .bid-feed {
    max-height: 200px;
  }
}
