/* Variables */
:root {
  --primary: #667eea;
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-dark: #5568d3;
  --secondary: #6c757d;
  --success: #10b981;
  --danger: #dc3545;
  --warning: #ffc107;
  --light: #f8f9fa;
  --dark: #212529;
  --border: #dee2e6;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
}
.main-header {
  width: 100%;
  background: #ffffff;
  padding: 12px 24px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* LOGO */
.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 150px;
  height: 100px;
  object-fit: contain;
}

/* Upload Section */
.upload-section {
  margin-bottom: 30px;
}

.upload-area {
  border: 3px dashed var(--primary);
  border-radius: 15px;
  padding: 50px 30px;
  text-align: center;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  cursor: pointer;
  transition: all 0.3s;
}

.upload-area:hover {
  border-color: var(--primary-dark);
  background: linear-gradient(135deg, #e7ebff 0%, #f8f9ff 100%);
  transform: scale(1.02);
}

.upload-icon {
  font-size: 4em;
  margin-bottom: 15px;
}

.upload-area h3 {
  color: var(--dark);
  margin-bottom: 10px;
  font-size: 1.5em;
}

.upload-area p {
  color: var(--secondary);
  margin-bottom: 20px;
}

.btn-upload {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 15px 40px;
  border: none;
  border-radius: 10px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-upload:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}

.image-preview {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  background: white;
  padding: 20px;
}

.image-preview img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 15px;
}

.preview-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* Análisis Resultado */
.analisis-resultado {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  margin: 30px 0;
}

.analisis-resultado h3 {
  color: var(--primary);
  margin-bottom: 20px;
  font-size: 1.5em;
}

.analisis-card {
  background: #f8f9fa;
  border-left: 4px solid var(--primary);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.analisis-card h4 {
  color: var(--dark);
  margin-bottom: 10px;
}

.caracteristica-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.caracteristica-item:last-child {
  border-bottom: none;
}

.caracteristica-label {
  font-weight: 600;
  color: var(--secondary);
}

.caracteristica-valor {
  color: var(--dark);
  font-weight: bold;
}

.confianza-badge {
  display: inline-block;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: bold;
}

.confianza-alta {
  background: #d1e7dd;
  color: #0f5132;
}

.confianza-media {
  background: #fff3cd;
  color: #664d03;
}

.confianza-baja {
  background: #f8d7da;
  color: #842029;
}

.solicitud-foto {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 15px;
  border-radius: 8px;
  margin: 10px 0;
}

.solicitud-foto ul {
  margin: 10px 0;
  padding-left: 20px;
}

/* Búsqueda Alternativa */
.busqueda-alternativa {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid var(--border);
}

.toggle-text {
  text-align: center;
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  padding: 10px;
  transition: all 0.3s;
}

.toggle-text:hover {
  color: var(--primary-dark);
}

#toggleIcon {
  transition: transform 0.3s;
}

#toggleIcon.rotated {
  transform: rotate(180deg);
}

.brand-name {
  font-size: 1.4rem;
  font-weight: bold;
  color: #015293;
}

/* NAV */
.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.main-nav a {
  color: #015293;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.main-nav a:hover {
  color: #d42429;
}

/* BOTÓN INGRESAR */
.btn-login {
  background: #d42429;
  color: #ffffff !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: bold;
}

.btn-login:hover {
  background: #015293;
}
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 10px;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}


.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 20px;
  text-align: center;
}

.hero h2 {
  margin-bottom: 10px;
  font-size: 36px;
  font-weight: 700;
}

.hero p {
  margin-bottom: 40px;
  font-size: 18px;
  opacity: 0.95;
}

.search-box {
  max-width: 1000px;
  margin: 0 auto 30px;
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.search-group {
  display: flex;
  flex-direction: column;
}

.search-group.full-width {
  grid-column: span 2;
}

.search-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
}

.search-box input,
.search-box select {
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: white;
}

.search-box input:focus,
.search-box select:focus {
  outline: none;
  border-color: var(--primary);
}

.search-box select {
  cursor: pointer;
}

.btn-search {
  grid-column: span 2;
  padding: 14px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-search:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

.quick-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.quick-actions button {
  padding: 12px 24px;
  border: 2px solid white;
  background: transparent;
  color: white;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.quick-actions button:hover {
  background: white;
  color: var(--primary);
  transform: translateY(-2px);
}

.benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
}

.benefit {
  background: white;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.benefit:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.benefit h3 {
  font-size: 24px;
  margin-bottom: 10px;
  color: var(--primary);
}

/* Sección Cómo Funciona */
.how-it-works {
  background: white;
  padding: 60px 20px;
}

.how-it-works h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 40px;
  color: var(--dark);
}

.roles-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: auto;
}

.role-card {
  background: var(--light);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.role-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.role-card h3 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--dark);
}

.role-card ol {
  text-align: left;
  padding-left: 20px;
  margin-bottom: 25px;
}

.role-card ol li {
  margin-bottom: 10px;
  color: var(--secondary);
}

.btn-role {
  width: 100%;
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-role:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-role.repuestero {
  background: var(--success);
}

.btn-role.repuestero:hover {
  background: #146c43;
}

.btn-role.admin {
  background: var(--secondary);
}

.btn-role.admin:hover {
  background: #5c636a;
}

/* Resultados */
.results {
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
}

.results h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 30px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: 8px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.result-card, .repuestero-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s;
}

.result-card:hover, .repuestero-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 15px;
}

.card-header h4 {
  margin: 0;
  font-size: 18px;
  color: var(--dark);
  flex: 1;
}

.price {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  margin-left: 10px;
}

.distance {
  background: var(--primary);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
}

.card-body {
  margin-bottom: 15px;
}

.card-body p {
  margin: 8px 0;
  font-size: 14px;
  color: var(--secondary);
}

.description {
  font-style: italic;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.seller-info {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-whatsapp, .btn-quote, .btn-primary {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s;
  min-width: 120px;
}

.btn-whatsapp {
  background: #25D366;
  color: white;
}

.btn-whatsapp:hover {
  background: #1da851;
}

.btn-quote {
  background: var(--warning);
  color: var(--dark);
}

.btn-quote:hover {
  background: #e0a800;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

/* Estados */
.loading, .hint, .error-message, .no-results {
  text-align: center;
  padding: 40px 20px;
  font-size: 18px;
  color: var(--secondary);
}

.error-message, .no-results {
  background: white;
  border-radius: 12px;
}

.no-results .suggestions {
  text-align: left;
  background: var(--light);
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.no-results .suggestions ul {
  margin: 10px 0 0 20px;
  color: var(--secondary);
}

.no-results .suggestions li {
  margin: 8px 0;
}

.ai-analysis {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.ai-analysis h3 {
  color: var(--primary);
  margin-bottom: 15px;
}

/* Modales */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: var(--secondary);
}

.close:hover {
  color: var(--danger);
}

.access-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.access-card {
  background: var(--light);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.access-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.access-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.access-card h3 {
  margin-bottom: 10px;
  color: var(--dark);
}

.access-card p {
  color: var(--secondary);
  font-size: 14px;
}

/* Chat Modal */
.chat-container-modal {
  margin-top: 20px;
}

.chat-messages-modal {
  height: 400px;
  overflow-y: auto;
  background: var(--light);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

.message {
  margin-bottom: 15px;
  display: flex;
}

.message.user {
  justify-content: flex-end;
}

.message-content {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 12px;
  line-height: 1.4;
}

.message.user .message-content {
  background: var(--primary);
  color: white;
}

.message.assistant .message-content {
  background: white;
  color: var(--dark);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chat-input-modal {
  display: flex;
  gap: 10px;
}

.chat-input-modal input {
  flex: 1;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
}

.chat-input-modal input:focus {
  outline: none;
  border-color: var(--primary);
}

.chat-input-modal button {
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.chat-input-modal button:hover {
  background: var(--primary-dark);
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  padding: 40px 20px 20px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
}

.footer-section h4 {
  margin-bottom: 15px;
  color: white;
}

.footer-section p, .footer-section a {
  color: rgb(255, 255, 255);
  margin: 8px 0;
  display: block;
  text-decoration: none;
}

.footer-section a:hover {
  color: #d42429;
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
}

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 15px;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero h2 {
    font-size: 28px;
  }

  .search-box {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .search-group.full-width {
    grid-column: span 1;
  }

  .btn-search {
    grid-column: span 1;
  }

  .benefits {
    grid-template-columns: 1fr;
  }

  .roles-container {
    grid-template-columns: 1fr;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .card-actions {
    flex-direction: column;
  }

  .btn-whatsapp, .btn-quote, .btn-primary {
    width: 100%;
  }
}

/* Search Box Styles */
.search-box {
  padding: 20px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.search-box input, .search-box select, .search-box button {
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.search-box button {
  background: #0d6efd;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: bold;
}
.benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 40px 20px;
  max-width: 1000px;
  margin: auto;
}
.benefit {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}
.results {
  max-width: 1000px;
  margin: auto;
  padding: 40px 20px;
}
.card {
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}
.card h4 {
  margin: 0 0 5px 0;
}
.price {
  font-size: 18px;
  font-weight: bold;
  color: #198754;
}
.card a {
  display: inline-block;
  background: #25d366;
  color: #fff;
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
}
footer {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);  color: #ffffff;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

.store-section {
  padding: 3rem 1.5rem;
  background: #f8fafc;
}

.store-title {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 2rem;
  color: #0f172a;
  font-weight: 600;
}

.store-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  gap: 1.25rem;
  max-width: 1400px;
  margin: 0 auto;
  justify-content: center;
}

/* Asegurar que nunca se expanda más de lo necesario */
@media (max-width: 400px) {
  .store-cards {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

.store-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  max-width: 220px; /* Evitar que una sola pieza ocupe todo el ancho */
  width: 100%;
  margin: 0 auto; /* Centrar si hay una sola pieza */
}

.store-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.store-card img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  object-position: center;
  background: #f8fafc;
  padding: 0.75rem;
  max-width: 100%;
  display: block;
}

.store-body {
  padding: 0.875rem;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.375rem;
}

.store-body h4 {
  margin: 0;
  font-size: 0.9rem;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 2.4rem;
}

.pieza-marca {
  margin: 0 !important;
  font-size: 0.7rem !important;
  color: #3b82f6 !important;
  font-weight: 500;
  text-transform: uppercase;
}

.store-body p {
  margin: 0;
  font-size: 0.7rem;
  color: #64748b;
}

.price {
  display: block;
  margin: 0.25rem 0;
  font-size: 1rem;
  font-weight: 700;
  color: #16a34a;
}

.store-body button {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: background 0.2s ease;
  margin-top: 0.25rem;
}

.store-body button:hover {
  background: #1d4ed8;
}

/* Responsive */
@media (max-width: 768px) {
  .store-cards {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .store-card img {
    height: 120px;
    padding: 0.5rem;
  }
  
  .store-body {
    padding: 0.75rem;
  }
  
  .store-body h4 {
    font-size: 0.85rem;
    min-height: 2.2rem;
  }
  
  .price {
    font-size: 0.9rem;
  }
}

@media (min-width: 1200px) {
  .store-cards {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* ============================================
   ESTILOS PARA IMÁGENES DE PIEZAS Y LOGOS
   ============================================ */

/* Imagen de la pieza en tarjeta de resultado */
.card-image {
  width: 100%;
  height: 200px;
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.result-card:hover .card-image img {
  transform: scale(1.05);
}

/* Logo del repuestero (solo para suscriptores) */
.seller-logo {
  width: 80px;
  height: 40px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.seller-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Optimización de carga de imágenes */
.card-image img[loading="lazy"],
.seller-logo img[loading="lazy"] {
  opacity: 0;
  animation: fadeIn 0.3s ease-in forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Placeholder mientras carga la imagen */
.card-image::before {
  content: '';
  display: block;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

/* ============================================
   HERO SECTION - REDLINE INSPIRED DESIGN
   ============================================ */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 80px 20px 60px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(255,255,255,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.hero .text-highlight {
  background: linear-gradient(120deg, #ff5e5e 0%, #ff0808 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(16, 185, 129, 0.3));
}

.hero-description {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 30px;
  opacity: 0.95;
  line-height: 1.7;
}

.hero-stats-mini {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.stat-mini {
  font-size: 1rem;
  opacity: 0.9;
}

.stat-mini strong {
  font-weight: 700;
  font-size: 1.3rem;
  display: block;
  margin-bottom: 2px;
}

/* VIN DECODER SECTION IMPROVEMENTS */
.vin-decoder-container {
  background: white;
  border-radius: var(--radius-lg);
  padding: 35px;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  position: relative;
}

.vin-input-section h3 {
  color: var(--dark);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  text-align: center;
}

.vin-input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
}

.vin-input {
  flex: 1;
  padding: 16px 20px;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.3s;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

.vin-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.decode-btn {
  padding: 16px 32px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.decode-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.vin-help-text {
  text-align: center;
  color: var(--secondary);
  font-size: 0.9rem;
  margin: 10px 0 0;
}

/* MANUAL SEARCH TOGGLE */
.busqueda-alternativa {
  margin-top: 25px;
  padding-top: 25px;
  border-top: 2px dashed var(--border);
}

.toggle-text {
  text-align: center;
  color: var(--dark);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s;
}

.toggle-text:hover {
  color: var(--primary);
}

#toggleIcon {
  display: inline-block;
  transition: transform 0.3s;
  margin-left: 8px;
}

/* RESULTS STYLING */
.vehicle-info {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: var(--radius-md);
  padding: 25px;
  margin-top: 25px;
  border-left: 4px solid var(--success);
}

.vehicle-info h4 {
  color: var(--dark);
  font-weight: 700;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.parts-results {
  margin-top: 30px;
}

.loading-container {
  text-align: center;
  padding: 40px;
}

.spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 15px;
  border: 4px solid rgba(102, 126, 234, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: var(--secondary);
  font-weight: 600;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .hero {
    padding: 60px 15px 40px;
  }
  
  .hero h2 {
    font-size: 2rem;
  }
  
  .hero-stats-mini {
    gap: 20px;
  }
  
  .vin-decoder-container {
    padding: 25px;
  }
  
  .vin-input-group {
    flex-direction: column;
  }
  
  .decode-btn {
    width: 100%;
  }
}

/* ============================================
   HOW IT WORKS SECTION
   ============================================ */
.how-it-works {
  padding: 80px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  text-align: center;
}

.section-header {
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 15px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--secondary);
  margin: 0;
}

.roles-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.role-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s;
  border: 2px solid transparent;
}

.role-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.role-card.repuestero:hover {
  border-color: var(--success);
}

.role-header {
  margin-bottom: 30px;
}

.role-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.1));
}

.role-header h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.role-tagline {
  color: var(--secondary);
  font-size: 1.1rem;
  margin: 0;
}

.role-steps {
  text-align: left;
  margin-bottom: 25px;
}

.step-item {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--primary-gradient);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.role-card.repuestero .step-number {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.step-content h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 8px;
}

.step-content p {
  color: var(--secondary);
  margin: 0;
  line-height: 1.6;
}

.role-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
  justify-content: center;
}

.benefit-tag {
  background: linear-gradient(135deg, #f0f4ff 0%, #e7efff 100%);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.role-card.repuestero .benefit-tag {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.2);
}

.btn-role {
  width: 100%;
  padding: 16px 30px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-role:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-role.repuestero {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.btn-role.repuestero:hover {
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

@media (max-width: 992px) {
  .roles-container {
    grid-template-columns: 1fr;
    max-width: 600px;
  }
}

@media (max-width: 576px) {
  .how-it-works {
    padding: 60px 15px;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .role-card {
    padding: 30px 20px;
  }
  
  .step-item {
    gap: 15px;
  }
  
  .step-number {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
}

/* ============================================
   ADMIN SECRET ACCESS BUTTON
   ============================================ */
.admin-secret-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 45px;
  height: 45px;
  background: rgba(108, 117, 125, 0.3);
  border: none;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.3s;
  opacity: 0.2;
  z-index: 999;
  backdrop-filter: blur(5px);
}

.admin-secret-btn:hover {
  opacity: 1;
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

/* Hacer el botón casi invisible hasta que se pase el mouse */
.admin-secret-btn::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
}

/* Responsive para admin button */
@media (max-width: 768px) {
  .admin-secret-btn {
    width: 40px;
    height: 40px;
    bottom: 15px;
    right: 15px;
    font-size: 1.1rem;
  }
}
