/* General Styles */
:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --dark-color: #212529;
  --light-color: #f8f9fa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
}

/* Navbar */
.navbar-brand {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.nav-link {
  transition: color 0.3s ease;
  font-weight: 500;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  padding: 60px 0;
  min-height: 600px;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
  background-size: cover;
  opacity: 0.3;
}

.min-vh-75 {
  min-height: 75vh;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse Button Animation */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(255, 193, 7, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
  }
}

.pulse-button {
  animation: pulse 2s infinite;
  transition: all 0.3s ease;
}

.pulse-button:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4) !important;
}

/* Animación para la sección de Vendedor Digital */
.bg-gradient {
  position: relative;
  overflow: hidden;
}

.bg-gradient::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}


.animate-fade-in {
  animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
  animation: fadeIn 1s ease-out 0.3s backwards;
}

.animate-fade-in-delay-2 {
  animation: fadeIn 1s ease-out 0.6s backwards;
}

/* Benefit Badges */
.benefit-badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 10px 20px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.benefit-badge i {
  font-size: 1.2rem;
}

/* Search Card */
.search-card {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.nav-tabs {
  border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
  color: var(--secondary-color);
  border: none;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
  border-color: transparent;
  color: var(--primary-color);
}

.nav-tabs .nav-link.active {
  color: var(--primary-color);
  background: transparent;
  border-bottom-color: var(--primary-color);
  font-weight: 600;
}

/* Benefit Cards */
.benefit-card {
  background: white;
  padding: 30px;
  border-radius: 15px;
  transition: all 0.3s ease;
  height: 100%;
  border: 1px solid #e9ecef;
}

.benefit-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), #764ba2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: white;
  font-size: 2rem;
}

/* Parts Feed */
.pieza-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 100%;
  border: 1px solid #e9ecef;
}

.pieza-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.pieza-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #f8f9fa;
}

.pieza-body {
  padding: 20px;
}

.pieza-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--dark-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pieza-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--success-color);
  margin-bottom: 10px;
}

.pieza-seller {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
}

.seller-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  flex-shrink: 0;
}

.seller-avatar-img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #e9ecef;
}

.seller-info {
  flex: 1;
  min-width: 0;
}

.seller-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seller-location {
  font-size: 0.8rem;
  color: var(--secondary-color);
}

/* Botón de seguir en feed */
.pieza-seller .btn-outline-primary,
.pieza-seller .btn-success {
  padding: 4px 8px;
  font-size: 0.85rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.pieza-seller .btn-outline-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

.pieza-seller .btn-success {
  background: #28a745;
  border-color: #28a745;
}

.pieza-seller .btn-success:hover {
  background: #218838;
  border-color: #1e7e34;
  transform: scale(1.05);
}

/* Promotion Cards */
.promocion-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  overflow: hidden;
  color: white;
  position: relative;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.promocion-card:hover {
  transform: scale(1.03);
}

.promocion-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.promocion-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.promocion-description {
  opacity: 0.9;
  margin-bottom: 15px;
}

.promocion-price {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.promocion-seller {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

/* Seller Stats */
.seller-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 5px;
}

.stat-label {
  opacity: 0.9;
  font-size: 0.95rem;
}

/* Footer */
footer a:hover {
  color: var(--primary-color) !important;
  transition: color 0.3s ease;
}

.social-links a {
  transition: transform 0.3s ease;
  display: inline-block;
}

.social-links a:hover {
  transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section {
    padding: 40px 0;
    min-height: auto;
  }

  .search-card {
    padding: 20px;
  }

  .benefit-badge {
    font-size: 0.85rem;
    padding: 8px 15px;
  }

  .display-4 {
    font-size: 2rem;
  }

  .display-6 {
    font-size: 1.5rem;
  }

  .stat-number {
    font-size: 2rem;
  }
}

/* Loading States */
.spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3em;
}

/* Badges */
.badge-stock {
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 5px;
}

.badge-stock.disponible {
  background: var(--success-color);
}

.badge-stock.bajo {
  background: var(--warning-color);
  color: var(--dark-color);
}

.badge-stock.agotado {
  background: var(--danger-color);
}

/* VIN Input */
#vin-input {
  letter-spacing: 2px;
  font-family: 'Courier New', monospace;
  font-weight: 600;
}

/* Button Styles */
.btn {
  border-radius: 8px;
  padding: 10px 25px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #764ba2);
  border: none;
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color), #0f5132);
  border: none;
}
