/* Sección de Modelos */

.brands-carousel-section {
  background-color: #fff;
  padding: 60px 0;
  overflow: hidden;
}

.brands-carousel-section .section-title {
  text-align: center;
  font-size: 2rem;
  color: #113dcc;
  margin-bottom: 30px;
  font-family: 'Poppins', sans-serif;
}

.brands-carousel-wrapper {
  overflow: hidden;
  width: 100%;
}

.brands-carousel-track {
  display: flex;
  width: max-content;
  animation: scrollBrands 40s linear infinite;
}

.brand-item {
  flex: 0 0 auto;
  width: 150px;
  margin: 0 25px;
}

.brand-item img {
  width: 100%;
  height: auto;
  display: block;
}
  
@keyframes scrollBrands {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.models-section {
  padding: 80px 0;
  margin-top: 70px; /* Compensa el navbar fixed */
}

.models-section h1 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.5rem;
  color: #333;
}

.model-filters {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  background: #f5f5f5;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.filter-btn.active, .filter-btn:hover {
  background: #0066ff;
  color: white;
}

.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.model-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.model-card:hover {
  transform: translateY(-5px);
}

.model-image-slider {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.model-image-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.5s;
}

.model-image-slider img.active {
  opacity: 1;
}

.slider-controls {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
}

.slider-controls button {
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.model-info {
  padding: 20px;
}

.model-info h3 {
  font-size: 1.3rem;
  margin-bottom: 5px;
  color: #333;
}

.model-specs {
  color: #666;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.model-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0066ff;
  margin-bottom: 15px;
}

.model-actions {
  display: flex;
  gap: 10px;
}

.btn-view {
  flex: 1;
  padding: 10px;
  background: #333;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-view:hover {
  background: #0066ff;
}

.btn-whatsapp {
  padding: 10px 15px;
  background: #25D366;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.3s;
}

.btn-whatsapp:hover {
  background: #128C7E;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 10px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
  z-index: 10;
}

.modal-slider {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.modal-main-image {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  margin-bottom: 15px;
}

.modal-thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0;
}

.modal-thumbnails img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
}

.modal-thumbnails img.active {
  border-color: #0066ff;
}

.modal-info {
  padding: 20px;
  border-top: 1px solid #eee;
}
.model-colors {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 10px;
  font-style: italic;
}
/* Responsive */
@media (max-width: 768px) {
  .models-grid {
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .model-actions {
      flex-direction: column;
  }
}
.model-filters { display: flex; gap: 12px; flex-wrap: wrap; }
.filter-group { position: relative; }
.filter-btn.active,
.sub-filter-btn.active { outline: 2px solid #0ea5e9; }

.sub-filters { display: flex; gap: 8px; margin-top: 8px; }
.sub-filters.oculto { display: none; }

.badge-featured {
  font-size: .75rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffd166;
  margin-left: 8px;
}

.sub-filter-btn {
  background-color: #f5f5f5; /* Fondo claro por defecto */
  color: #333; /* Texto gris oscuro */
  border: 1px solid #ccc; /* Borde gris claro */
  border-radius: 20px; /* Bordes redondeados */
  padding: 6px 14px; /* Tamaño interno */
  font-size: 0.9rem; /* Tamaño del texto */
  cursor: pointer;
  transition: all 0.25s ease; /* Transiciones suaves */
}

.sub-filter-btn:hover {
  background-color: #0077b6; /* Azul en hover */
  color: #fff; /* Texto blanco */
  border-color: #0077b6;
  transform: translateY(-2px); /* Efecto sutil de elevación */
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15); /* Sombra suave */
}

.sub-filter-btn.active {
  background-color: #0096c7; /* Azul más intenso para activo */
  color: #fff;
  border-color: #0096c7;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Sombra un poco más marcada */
}
/* Espaciado general dentro del modal */
.modal-info > * + * { margin-top: 10px; }

.modal-info h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  line-height: 1.2;
}

.modal-info .model-price {
  margin: 0 0 8px;
  font-weight: 700;
}

/* Botón de WhatsApp del modal */
.modal-info .btn-whatsapp,
.btn-whatsapp.full-width,
.btn-whatsapp-modal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #25D366;
  color: #fff;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
.modal-info .btn-whatsapp i,
.btn-whatsapp-modal i { font-size: 1.1rem; }

/* Títulos de secciones */
.modal-info h4 {
  margin: 14px 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

/* Tabla de especificaciones */
.specs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;          /* columnas bien alineadas */
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;             /* redondeado real */
  font-size: 0.95rem;
}

.specs-table th,
.specs-table td {
  padding: 10px 14px;
  vertical-align: top;
}

.specs-table th {
  width: 42%;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  border-right: 1px solid #eef2f7;
  /* evita que salte de línea la etiqueta corta, pero permite cortes si es largo */
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.specs-table td {
  color: #0f172a;
  word-wrap: break-word;
}

/* Divisores entre filas */
.specs-table tr:not(:last-child) th,
.specs-table tr:not(:last-child) td {
  border-bottom: 1px solid #eef2f7;
}

/* Alternar sutilmente el fondo de las filas de valores */
.specs-table tr:nth-child(even) td { background: #fcfdff; }

/* Responsive: en pantallas chicas ajustamos proporciones y tamaño */
@media (max-width: 600px) {
  .modal-info h2 { font-size: 1.1rem; }
  .specs-table { font-size: 0.9rem; }
  .specs-table th { width: 48%; }
}
