/*
  Diseño estilo RMotion - Limpio y profesional
*/
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');

* {
  box-sizing: border-box;
}

html, body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f8f9fa;
  color: #333;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  line-height: 1.6;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

header, .shop-header {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  padding: 1rem 0;
  margin-bottom: 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

header h1, .shop-header h1 {
  margin: 0;
  color: #1e3a8a;
  font-size: 2rem;
  font-weight: 700;
  font-family: 'Roboto', sans-serif;
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  color: #4b5563;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
}

nav a:hover {
  color: #1e3a8a;
  background: #f3f4f6;
}
h1, h2, h3, h4 {
  color: #1f2937;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 1rem;
  font-family: 'Roboto', sans-serif;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #374151;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

section, main {
  background: #fff;
  margin-bottom: 2rem;
}

.content-section {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin-bottom: 2rem;
}

button, .checkout-btn {
  background: #1e3a8a;
  color: #fff !important;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
  outline: none;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

button:hover, .checkout-btn:hover {
  background: #1e40af;
  transform: translateY(-1px);
}

button:active, .checkout-btn:active {
  transform: translateY(0);
}
ul, ol {
  padding-left: 1.2rem;
}

li {
  margin-bottom: 0.5rem;
}

input, textarea, select {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #1e3a8a;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.product-list, .shop-main {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.product-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}
.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid #e5e7eb;
}

.product-info {
  padding: 1.5rem;
  text-align: left;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #1f2937;
  font-weight: 600;
}

.product-info .price {
  color: #1e3a8a;
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.product-info .desc {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
  flex: 1;
}

.product-link {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

.product-link:hover {
  color: #1e3a8a;
}

.add-to-cart-btn {
  width: 100%;
  margin-top: auto;
  background: #059669;
  font-size: 0.9rem;
}

.add-to-cart-btn:hover {
  background: #047857;
}

.cart-sidebar {
  min-width: 300px;
  max-width: 350px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 6rem;
}
#cart-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#cart-list li {
  background: #f9fafb;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 0.5rem;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

#cart-list li:hover {
  background: #f3f4f6;
}

#cart-total {
  font-weight: 700;
  font-size: 1.2rem;
  margin-top: 1rem;
  padding: 1rem;
  background: #f3f4f6;
  border-radius: 6px;
  text-align: center;
  color: #1e3a8a;
  border: 1px solid #e5e7eb;
}

.cart-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.cart-actions button {
  flex: 1 1 0;
  margin: 0;
  padding: 0.75rem 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.clear-cart-btn {
  background: #dc2626 !important;
}

.clear-cart-btn:hover {
  background: #b91c1c !important;
}
/* Chat widget y botón flotante */
.chat-widget {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Botón flotante del chat */
.chat-toggle-btn {
  position: fixed;
  right: 25px;
  bottom: 25px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff !important;
  border: none;
  cursor: pointer;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.2rem;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
}

.chat-toggle-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.6);
}

/* Widget del chat */
.chat-widget-fixed {
  width: 360px;
  height: 500px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: fixed;
  bottom: 100px;
  right: 25px;
  transition: all 0.3s ease;
  z-index: 2147483647;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.chat-messages {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 1rem;
}
.chat-messages-bottom {
  margin-top: auto;
}

/* Mensajes del chat */
.chat-message {
  padding: 10px;
  margin: 5px;
  border-radius: 10px;
  max-width: 80%;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-message-user {
  background: #007bff;
  color: #fff;
  align-self: flex-end;
}
.chat-message-other {
  background: #e9ecef;
  color: #222;
  align-self: flex-start;
}

/* Input del chat */
.chat-input-container {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  position: sticky;
  bottom: 0;
  border-top: 1px solid #eee;
}
.chat-input-field {
  flex: 1;
  padding: 5px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  font-size: 1rem;
}
/* =======================
   VEHICLE SEARCH PAGE
   ======================= */

/* Hero Section para búsqueda de vehículos */
.hero-section {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  padding: 4rem 0;
  margin-bottom: 3rem;
  text-align: center;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Search Section */
.search-section {
  margin-bottom: 3rem;
}

.search-container {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  border: 1px solid #e5e7eb;
}

.search-container h2 {
  color: #1e3a8a;
  margin-bottom: 2rem;
  font-size: 1.8rem;
  font-weight: 600;
}

/* Vehicle Search Form */
.vehicle-search-form {
  max-width: 100%;
}

.search-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group select {
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #1e3a8a;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
  outline: none;
}

.form-group input:hover,
.form-group select:hover {
  border-color: #6b7280;
}

/* Search Actions */
.search-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.search-actions .btn {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  min-width: 180px;
}

/* Results Section */
.results-section {
  margin-bottom: 3rem;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.results-header h2 {
  color: #1e3a8a;
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-controls label {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.sort-controls select {
  padding: 0.5rem 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
  min-width: 200px;
}

/* Vehicle Grid */
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* Vehicle Card */
.vehicle-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
  cursor: pointer;
}

.vehicle-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  border-color: #1e3a8a;
}

.vehicle-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

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

.vehicle-card:hover .vehicle-image img {
  transform: scale(1.05);
}

.vehicle-info {
  padding: 1.5rem;
}

.vehicle-info h3 {
  color: #1e3a8a;
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.vehicle-details {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0 0 0.5rem 0;
  font-weight: 500;
}

.vehicle-location {
  color: #374151;
  font-size: 0.9rem;
  margin: 0 0 1rem 0;
  font-weight: 500;
}

.vehicle-price {
  color: #1e3a8a;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
}

.vehicle-payment {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0 0 1.5rem 0;
}

/* Vehicle Actions */
.vehicle-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.vehicle-actions .btn {
  flex: 1;
  padding: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.btn-favorite {
  background: #f8f9fa;
  color: #6b7280;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.btn-favorite:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

.btn-favorite.active {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

.financing-calculator-btn {
  background: #f8f9fa;
  color: #1e3a8a;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 0.5rem;
}

.financing-calculator-btn:hover {
  background: #1e3a8a;
  color: white;
  border-color: #1e3a8a;
}

/* Financing Section */
.financing-section {
  margin-top: 3rem;
}

.financing-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  border: 1px solid #e5e7eb;
}

.financing-card h3 {
  color: #1e3a8a;
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
}

.financing-form .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 2rem;
}

.calculation-result {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.result-item:last-child {
  margin-bottom: 0;
  border-top: 2px solid #e5e7eb;
  padding-top: 0.75rem;
}

.result-label {
  font-weight: 600;
  color: #374151;
}

.result-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e3a8a;
}

/* Price Range Slider */
.price-slider-container {
  position: relative;
}

.price-display {
  display: inline-block;
  background: #1e3a8a;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1e3a8a;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1e3a8a;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Search Input Group */
.search-input-group {
  grid-column: 1 / -1;
}

.search-input-group input {
  font-size: 1rem;
  padding: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
    padding: 0 1rem;
  }
  
  .search-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .search-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-actions .btn {
    min-width: auto;
  }
  
  .results-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .sort-controls {
    justify-content: center;
  }
  
  .vehicle-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .vehicle-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .financing-form .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .search-container,
  .financing-card {
    padding: 1.5rem;
  }
  
  .vehicle-info {
    padding: 1rem;
  }
  
  .hero-content h1 {
    font-size: 1.8rem;
  }
}

/* Animaciones y efectos adicionales */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container > * {
  animation: fadeInUp 0.6s ease-out;
}

/* Scroll suave */
html {
  scroll-behavior: smooth;
}

/* Loading states */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Mejoras en accesibilidad */
*:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Themes */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ======================
   WELCOME MESSAGE STYLES
   ====================== */

/* Estilos personalizados para el mensaje de bienvenida de la demo */
.demo-welcome-message {
  animation: welcomeSlideIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 25px 60px rgba(102, 126, 234, 0.4), 
              0 10px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(15px);
}

.demo-welcome-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(102, 126, 234, 0.1) 0%, 
    rgba(118, 75, 162, 0.1) 100%);
  border-radius: inherit;
  z-index: -1;
}

/* Animación de entrada personalizada */
@keyframes welcomeSlideIn {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    filter: blur(5px);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-10px) scale(1.02);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Efecto hover para el mensaje de bienvenida */
.demo-welcome-message:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 30px 70px rgba(102, 126, 234, 0.5), 
              0 15px 25px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Pulso sutil en los botones del mensaje de bienvenida */
.demo-welcome-message .welcome-message-button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.demo-welcome-message .welcome-message-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.demo-welcome-message .welcome-message-button:hover::before {
  width: 300px;
  height: 300px;
}

.demo-welcome-message .welcome-message-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
